Maybe you forgot to grease your cake pan. Maybe you simply greased it improperly, with the wrong ingredients, such as salted butter (unsalted.
Baking a cake can be very rewarding, but there's nothing as disappointing as pulling it from the oven only to have it fall apart when you lift it from the pan.
Place the mug and the cake pan in a microwave, cupboard, or other enclosed space. Leave it there for several minutes, then try to remove the cake again.