The crash happened on the A713 Ayr to Patna Road in the early hours of Sunday.
Emergency services were called to the scene at about 2.50am, where the black Seat Ibiza had left the road.
The 17-year-old female driver and a 19-year-old male passenger were both taken to Ayr Hospital, Police Scotland said.
The man was then transferred to Queen Elizabeth University Hospital in Glasgow, where staff say he is in a serious but stable condition.
Another passenger, a 14-year-old girl, was taken to Crosshouse Hospital in Kilmarnock, where she remains in a stable condition.
Officers are asking anyone with information to contact them.
Sergeant Iain Pittams, based at Irvine, said: “I would appeal to anyone who was on the A713 in the early hours of Sunday morning and may have witnessed the crash to get in touch.
“Similarly, if anyone saw a black Seat Ibiza on the road around the time of the incident, please come forward.”
The divisional road policing unit at Irvine can be contacted on the 101 number.