A Hispanic man was later taken into custody, San Diego police chief Shelley Zimmerman told a news conference.
The officers radioed in that they were making a traffic stop late Thursday, then called for emergency backup soon after, she said.
Officers who arrived found the first two had been shot. One died in the hospital, Zimmerman said.
It was too early to say whether the officers had been ambushed, she added.
Police launched a manhunt after the incident.
America has been on edge for weeks following shootings of police officers in Dallas and Baton Rouge, Louisiana.
Those attacks followed anger among the black community over the shooting deaths of African-American suspects by white police in Minnesota and Louisiana.