The shooting happened Tuesday at the Colony Park Apartments in Pearl, a city of about 25,000 people just east of Jackson.
Pearl Police Department spokesman Lt. Butch Townsend identified the slain officer as Michael J. "Mike" Walter. Townsend says another officer was shot in the hand and arm and a third was injured in the shooting, but not from a bullet wound.
Townsend says Walter played baseball for the Houston Astros organization from 1993 to 2000.
Rankin County District Attorney Michael Guest says the officers were serving a warrant when Carnell Gaines Jr. shot them. Guest said at least one of the officers returned fire, killing Gaines.