SAN FRANCISCO—Bay Area prosecutors have been forced to dismiss more than 800 criminal cases in the past year because of allegations of police corruption that include selling drug evidence, conducting unlawful searches and conspiring to get men drunk and then arrest them on drunk-driving charges.

The series of police scandals has taxed the budgets of the district-attorney and public-defender offices, and prompted two federal investigations.

In...