The memo details problems with the city's DNA crime lab.
The memo was authored by a retired prosecutor in early 2010. The author of the memo says it was shared with top police brass, but withheld from state officials auditing San Francisco's crime lab.
The judge ruled the memo is vital to a 1976 murder case.
Gascon has 10 days to appeal the ruling.