The standoff began in the area of Seminole and Tampa ways shortly after 4 a.m. It ended at 8:41 a.m. when the man was taken into custody.
The man was wanted on suspicion of attempted murder, police Sgt. Ronnie Lopez said.
Police first spotted the car at about 1:50 a.m. in the area of Cunningham Avenue and tried to pull it over for a vehicle code violation, Lopez said.
The suspect fled, and officers did not pursue the car.
The car was later seen near Seminole and Tampa Ways at 4:08 a.m. When police tried to contact the driver, he pulled out a gun and fired shots at the officers, Lopez said.
Police returned fire. One officer suffered cuts to his face from broken glass but no officers were hit by gunfire, Lopez said.
Bullets struck the suspect's car but it's not clear whether he was injured, police said.
About 15 residents of the East San Jose neighborhood were evacuated, Lopez said.