The incident happened Monday afternoon near the Texas A&M University campus in College Station city, Xinhua reported citing local TV channel ABC13.
Police confirmed that 41-year-old constable Brian Bachmann and an unidentified civilian male were killed.
The shooting occurred around 12.45 p.m. A resident of the area said he heard about 30 gunshots. CNN said the entire ordeal lasted around 15 minutes.
Another police officer was shot in the leg and a woman civilian was also shot and injured.
Rhonda Seaton, a spokeswoman with the College Station police department, told CNN that the three people killed were the constable, the man authorities say exchanged gunfire with law enforcement officers and an unidentified civilian.
The gunman was shot and taken into custody by police, according to ABC13. Other media reports said the suspect later succumbed to injuries.
An online report by the Houston Chronicle said at least six people were taken to hospital.
The identity of the shooter was not known and the cause of the shooting also remained unclear.
According to RIA Novosti, a police official told the Huffington Post that two police officers were wounded, one fatally, by a gunman inside a home near the university.
It was not clear why police initially went to the home where the gunman was located, the police official said.
College Station police department assistant chief Scott McCollum told CNN law enforcement officers responded to a "shots fired call" and arrived at the scene and found the constable down in the front yard of a home.
The officers "began taking fire... they defended themselves," he said.
"They ended up shooting the gunman and taking him into custody," McCollum said.
He said it was still unknown why constable Bachmann went to the address. But another officer, Jason James, with the police department in Bryan adjacent to College Station, told CNN that "there is a possibility that it was an eviction".
James said 911 calls began coming in after law enforcement authorities were on the scene, rather than officers responding to a shooting that neighbours told them about.
"It's not like a disturbance where they were actually dispatched to it. They weren't responding to a shooting, but it turned into one," James told CNN.