Why is ampicillin prescribed to patients? Ampicillin is used for treating infections of the middle ear, sinuses, stomach and intestines, bladder, and kidney caused by susceptible bacteria. It also is used for treating uncomplicated gonorrhea, meningitis, endocarditis and other serious infections.