Pfizer Inc. on Saturday said it would stop trying to discover new drugs for Alzheimer’s disease and Parkinson’s disease, abandoning costly but futile efforts to find effective treatments for the disorders.

The cutback will result in layoffs of 300 employees in Cambridge and Andover in Massachusetts and in Groton, Conn., over several months, according to a company statement.

The...