Mojmir I used the civil war within the Carolingian Empire as an opportunity to plot a rebellion and try to throw off the yoke of Frankish overlordship in the 840s.
Thus his emerging power became a serious threat to Louis II the German, ruler of the East Frankish kingdom.
The Franks invaded Moravia in mid-August 846.
They encountered little resistance and deprived Mojmir I of his throne.
He seems to have fled or been killed during the invasion.
His relative, Rastislav, was set up as the new client ruler of Moravia.

[Louis the German] set off around the middle of August with an army against the Moravian Slavs who were planning to defect.
There he arranged and settled matters as he wished, and set Rastiz, a nephew of Moimar, as a dux over them.

— Annals of Fulda (year 846)
Mojmir I used the civil war within the Carolingian Empire as an opportunity to plot a rebellion and try to throw off the yoke of Frankish overlordship in the 840s. Thus his emerging power became a serious threat to Louis II the German, ruler of the East Frankish kingdom. The Franks invaded Moravia in mid-August 846. They encountered little resistance and deprived Mojmir I of his throne. He seems to have fled or been killed during the invasion. His relative, Rastislav, was set up as the new client ruler of Moravia.
[Louis the German] set off around the middle of August with an army against the Moravian Slavs who were planning to defect. There he arranged and settled matters as he wished, and set Rastiz, a nephew of Moimar, as a dux over them.
— Annals of Fulda (year 846)
Mojmir I of Moravia