Australian athlete Jayde Taylor was posing for a photo with a team-mate when the Queen appeared in the background smiling over her shoulder.
The hockey player then posted the picture on Twitter, writing: " Ahhh The Queen photo-bombed our selfie!!"
It immediately swept the micro-blogging site, being retweeted thousands of times within just an hour complete with the hashtag #queenselfie.
The Queen, who is carrying out a series of engagements at venues across Glasgow today, soon featured in other photos from athletes.
Fellow Australian hockey player Anna Flanagan posted a photo and said: "What a day!! 4-0 win over Malaysia... And we just met the Queen!"
England hurdler Andy Turner also uploaded his attempt at a selfie with a photo of himself smiling to the camera and the Queen in the background.
The Queen and Duke of Edinburgh visited the National Hockey Centre where they watched England take on Wales in the women's hockey.
They also met the Australian women's hockey team after their victory over Malaysia in the first match of the competition.
The couple have also been watching some of the swimming action at the pool.