Michael Phelps was swimming in EDM this weekend -- and even though he wasn't in the water ... the dude found a reason to lose his shirt anyway.
The all-time Olympian -- who's got 23 gold medals to his name -- was on hand Saturday night at the XS Nightclub within the Wynn Las Vegas resort ... and he was in partying mood, which was only facilitated further with Diplo in the DJ booth and a packed crowd.
Mike and Diplo bro'd out behind the turntables .