The star, who turns 18 Nov. 23, was snapped having a good time – holding what appears to be a lime-garnished beer and hanging with a bevy of young men in the famous dance club Kapital in Spain's capital city.
"I can't wait for the EMAs! It will be my first performance on this amazing show and the people of Madrid are going to be the best audience ever!" Cyrus said when her appearance was announced.
The awards show will be hosted by Eva Longoria. Other acts set to perform include Kings of Leon, Ke$ha, Rihanna, Kid Rock, Katy Perry (her first appearance since becoming Mrs. Russell Brand) and Linkin Park.
The 17th annual EMAs, a global celebration of the world's music, will air in the U.S. on Sunday (9 p.m. ET) on MTV2.