Magearna is the love interest of Volcanion in Pokemon: Volcanion And The Mechanical Marvel.
Magearna was built over 500 years ago. At some point it encountered Volcanion in a refuge for abandoned pokemon. Volcanion is fiercely protective of Magearna, getting between it and any human.
When a pokemon collector takes Diancie, Volcanion comes to its rescue. Magearna gradually helps Volcanion learn to trust humans. When it's kidnapped once again, Magearna's captors take it's heart, shutting Magearna down. Magearna's heart is used to make a weapon of mass destruction. Volcanion comes to its rescue, but finds that Magearna's mind has been wiped, upsetting it dearly.
When Volcanion survives a seemingly kamikaze mission against their enemy, Magearna regains its memories. The two of them are able to live in peace after that.