High-flying McGregor was rudely brought down to earth with a pummelling early in the second round as Diaz made his weight advantage count and beat McGregor with a rear-naked choke submission.
When a McGregor punch cut Diaz above his right eye in round one, McGregor fans could have been forgiven for thinking that their man was still the favorite to win a fight with a guy two weight classes above him.
And despite Diaz's weight advantage, McGregor used his speed and power well in the first round to maintain a marginal advantage. McGregor had promised a finish by the second round - a longer fight could go either way with Diaz getting more chances to land a knockout punch or use his size to bring McGregor down.
Round two saw Diaz show his hand - he used his weight advantage to absorb whatever punishment McGregor could dish out and moved in for a takedown. As the round continued, Diaz overcame McGregor through a series of punches and worked him over in the clinch.
McGregor looked desperate and Diaz took him down with a rear-naked choke, winning the bout via submission.
The result came as a huge shock to the fans in the arena, especially in the aftermath of another underdog win with Meisha Tate beating Holly Holm in the previous fight. However, the reality of the difference in weight classes is that only McGregor's charisma and star appeal made him the favorite going into this fight - otherwise the numbers were stacked against him.
After the fight, McGregor was clear on where he failed, lamenting his lack of efficiency and giving credit to Diaz for fighting well.
The final word went to Diaz:
Luckily for McGregor this was a non-title fight, but it will give him plenty to learn from as his camp digests the realities of fighting a bigger opponent.
Rafael dos Anjos, the UFC lightweight champion who withdrew from his UFC 196 title fight against McGregor due to injury, will also have learned a few things from this fight ahead of his expected clash with McGregor.
McGregor may not return immediately to the Octagon with a UFC 200 appearance now looking most likely, but wherever he goes next, he's shown that despite the bravado, he is still human and fallible. Fighting above his weight class will only open him to more chances of defeat.