It happened around 3:00 Sunday morning near 15th and Webster streets in South Philadelphia.
Authorities responded to the scene where the victim told police he was chased by several males in a white vehicle.
According to the victim, the driver of the white vehicle rear ended him, causing an accident.
The men in the vehicle got out and one of them opened fire, striking the victim in the head. Shortly after the men got back into the white car and fled.
The victim suffered a graze wound to the head and was taken to Jefferson Hospital for treatment.
Police say they found a white Pontiac with heavy front end damage on the 1300 block of South Cleveland Street.
No word on any suspects at this time.