Murphy did not enjoy the best start to the week after failing a breath test before racing at Salisbury on Sunday, but he put that incident well behind him as he steered Andrew Balding’s charge to victory.
Nayef Road set the pace in the 14-furlong heat with Barbados on his heels, while Murphy maintained a watching brief on the 6-1 winner and it was between those three from some way out.
Dashing Willoughby seized the initiative coming into the final two furlongs and despite drifting across the track, he held on by half a length, with Murphy punching the air as he passed the post.
Barbados snatched second for Aidan O’Brien, with the Mark Johnston-trained Nayef Road sticking to his guns well in third.
Balding said: "He loves the ground, he stays well and he's pretty classy.
"He had a little hiccup on Saturday morning - he was very lame. He had a blood blister in his foot and our farrier Eugene Cullen and head lad Kevin Hunt worked through the night and, happily, he was right 24 hours later.
"We're just delighted. It's great for Mick and Janice [Mariscoti, Dashing Willoughby's owners] who have been very good, loyal supporters of ours.
"He's got a bit of talent, this horse. We were really hopeful coming into the race and the rain certainly was in his favour. The St Leger is the logical objective. It'll be a lot tougher than this, but I think he deserves to be heading in that direction now."
Owner Mick Mariscoti said: "This is indescribable. I wasn't there on Derby day when we had our 50th winner - I was on a plane to Madrid to watch Spurs - but I am delighted to be here today.
"The joy of days like today makes up for 100 days when it is not quite as good. This our first Group winner and our first Royal Ascot winner.
"I cannot really describe how I feel, it's fantastic."
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."