One of the state officers was in serious condition after the 1:30 a.m. attack, a news release from the Tijuana police department said.
City police said they had no further details, and the Baja California state attorney general's office declined to comment.
Drug gangs have raided police offices in the past to rescue members in custody. Some have even invaded hospitals to kill wounded rivals.
State police often interrogate suspects at the offices where the shootings occurred, but it was not clear whether any suspects were there at the time.
Tijuana is experiencing unprecedented violence as gangs fight for control of the lucrative drug route into the United States and the government cracks down on organized crime.
Elsewhere, a woman was in serious but stable condition Wednesday after being shot three times by soldiers in a suburb of the northern city of Monterrey, authorities said.
Sanjuana Hernandez, 38, was wounded in the stomach and buttocks Monday night in Escobedo, said a city official, who was not authorized to give his name. He said initial reports indicated the woman failed to stop at a military checkpoint.
Mexico's Defense Department declined to comment, and authorities said the woman was too weak to make a statement.
Last week, a 35-year-old pregnant woman was shot to death by soldiers after reportedly failing to stop at a checkpoint in the northern state of Chihuahua.
Soldiers man checkpoints across Mexico as part of the national crackdown on drug gangs, and some of those posts are poorly marked.