When and how did the Mao ZeDong lose his power?
One could answer that he didn't
Mao died in 1976. In the early 60's some of the Chinese communist party leaders attempted to introduce limited reforms. Mao countered these through The Cultural Revolution unleashing his Red Guards.
This re-established control of the Party and Government by the radical faction led by his wife Chiang Ching. It is unclear what direct control Mao had in his latter years, but certainly even if he was not in control his policies were being enforced.
After his death the radicals lost in a power struggle with those who wished to introduce economic reforms. So Maoism if you like only started to lose out after he died.
I agree with the above, he never lost his power, although he did face challenges to his rule. The people who challenged him or even threatened his rule were arrested and thrown in prison. Look up Lin Biao and his 'plane crash' or 'the gang of four'. He died as the chairman of the communist party which in Western terms means the absolute leader of China.