The collision happened near the village of Whitley, on Selby Road between Askern and Selby, shortly before 10pm on Friday night.
The men, aged 26 and 21, were inside a silver Ford Focus which struck a tree. Both died at the scene. They have not yet been identified.
A North Yorkshire Police statement said:-
"At about 9.50pm on Friday 29 November 2019, officers were called to a report of a silver Ford Focus colliding with a tree on the A19 at Whitley.
"Sadly, despite the efforts of all the emergency services – including the Yorkshire Air Ambulance and specialist HART paramedics – both occupants of the car were pronounced dead at the scene. They were aged 21 and 26. Their families have been informed.
"Police are appealing for anyone who saw the collision, or the vehicle involved, or may have dash-cam footage, to get in touch. Prior to the collision, the Ford was travelling north from the direction of Askern towards Whitley.
"The road was closed until 4.50am Saturday morning, while officers investigated the scene and recovered the vehicle involved."
Witnesses are asked to contact North Yorkshire Police’s Major Collision Investigation Team via email, [email protected], or dial 101, select option 2 and ask for the Major Collision Investigation Team or TS Mark Patterson. Please quote reference number 12190219475 when passing information about this incident.