Best way to control power with MCU gpio pin
The way that you propose is not a good way to switch the power to the load. You should instead switch the VCC power side and keep all the GNDs common between the MCU and the power switched device.

The technique used to achieve this would be to use a P-Channel MOSFET for the power switch and then an additional small signal transistor to provide level translation from the MCU GPIO voltage levels to the Gate drive for the P-Channel MOSFET. 

Here is a picture of such a design. I show using an NPN BJT for the level translator but a small signal N-FET could be used as well as long as the gate level threshold is compatible with the MCU GPIO levels.



Note that there are some situations where you could be switching power to a load device and it would be desirable to keep the MCU GND separate from the switched load. This may be the case if the load generates a lot of noise, huge current surges or is a dangerous voltage such as AC mains. In this instance the load switching would be done through a relay or an opto-isolator.