It happened around 2 p.m. Sunday near 100th and Longfellow avenues.
Neighbors heard several shots.
When police arrived, they found the victims in a vehicle that had crashed into a parked car.
Homicide investigators gathered evidence and talked to potential witnesses.
"We've got officers canvassing up and down the area, looking for any information citizens may have," Lt. Roland Holmgren said. "However insignificant they may feel it is, they may be the piece of the puzzle that helps solve this."
Police believe the men were likely targeted.
Anyone with information about the suspects or motive for the shooting is asked to contact Oakland police at (510) 777-3333.