The incident unfolded around 3:30 a.m. Wednesday at the Winchell's on Western Avenue near Venice Avenue, according to the LAPD.
Authorities say the suspect had a handgun and pistol-whipped a woman who was working at the store. She was said to be conscious and breathing.
Officers saw him flee from the store on foot and eventually encountered the man in a nearby U-Haul parking lot.
At some point, officers opened fire but the suspect was not struck, authorities added. It's unclear what led up to the shooting.
Officers then used a Taser to take the suspect into custody. He was taken to the hospital to be treated for unspecified injuries.
An investigation into the incident is ongoing.