Najib had faced growing pressure from within UMNO after the devastating election results on Thursday.
The ousted politician said he was taking"moral"responsibility for the defeat. Ahmad Zahid Hamidi will take over as UMNO boss and Hishammuddin Hussein will be deputy leader.
The ban on Najib and his wife leaving the country came shortly after he announced plans for a short holiday.
A leaked flight manifesto shows Najib and Rosmah were due to leave on a private jet on Saturday to Jakarta,fuelling rumours he was fleeing the country to escape possible prosecution over a massive corruption scandal involving the 1MDB wealth state fund.
Loading
Najib's statement on social media didn't say where he was heading said he was committed to"facilitating a smooth transfer of power."He apologised for his mistakes and shortcomings and said he intended to continue serving the people.