TMZ/Getty

Elon Musk Grimes Sings ... He's a Great Gamer But a Lousy BF!!!

Elon Musk may have just gotten Swifted, because his ex has just released a song trashing him as a BF.

Grimes' song, "Player of Games," doesn't mention Elon by name, but you don't have to be a rocket scientist like him to figure it out.

The song references gaming -- something Elon apparently loves. The lyrics go ... "I'm in love with the greatest gamer, but he'll always love the game, more than he loves me."

Their 3-year relationship ended back in September -- and she goes on ... "Sail away, to the cold expanse of space. Even love couldn't keep you in your place."  Seems like that's the giveaway!

Elon didn't call it a clean breakup ... he said they have "semi-separated." They did attend the Met Gala back in September, but it's unclear if this was before or after the breakup.

They both seem committed to co-parenting their 1-year-old son, X Æ A-Xii Musk.

Elon has an impressive list of exes, including first wife, author Justine Wilson, 2 marriages to "Westworld" star Talulah Riley and Amber Heard.

Click here for info about our online advertising practices.