The crash happened at Highway 145 just west of Highway 41 around 6:30 pm.
California Highway Patrol officers say the men were traveling westbound on Highway 145 when the car drifted onto the right shoulder. The driver lost control and the vehicle flipped over, ejecting both its occupants.
The victims, both men in their thirties from Madera, died as a result of their injuries.
CHP officers say they were not wearing seat belts at the time of the crash. They do not yet know if drugs or alcohol were factors.
The CHP has shut down roadways and traffic is disrupted near Highway 145 and Road 38, and Highway 145 and Highway 41.
This story is developing and will be updated.