Trained by Andrew Balding, the three-year-old son of Nathaniel ran on strongly in the closing stages of the 14-furlong contest, despite drifting across the track, to score by a half-length.
The Aidan O'Brien-trained Barbados (20/1) was second, with a half-length back to Mark Johnston's Nayef Road (16/1) in third.
Murphy, registering his third winner at Royal Ascot overall, said: "I was thrilled with the way the race went and Dashing Willoughby did it well.
"This is the combination of all the hard work from the team at home. I thrive to do well at Royal Ascot as does every jockey riding and I was very fortunate to ride a horse capable of doing that today.
"I thought I was on the best horse, and I am delighted to ride a Royal Ascot winner for my first boss Andrew Balding.
"Dashing Willoughby is a son of Nathaniel and loves this ground - remember Nathaniel won a soft ground King George."
Dashing Willoughby is a 16/1 shot for the St Leger at Doncaster in September with Betfred