The immigration department announced via its social site account that Najib and his wife Rosmah Mansor have just been backlisted from leaving the country.
"I was already informed that the immigration department of Malaysia doesn't allow me and my family to foreign countries," Najib said in a tweet moments later, "I respect this instruction and will stay in the country with my family."
In an earlier statement, Najib said he would take a vacation in a foreign country starting Saturday, and would make a decision during this period on his position as president of the United Malays National Organization (UMNO) and chairman of the Barisan Nasional (BN) coalition.
As the leading party, UMNO has led the coalition to govern Malaysia since the country's independence in 1957, before losing in the general elections earlier this week.
The new governing coalition Pakatan Harapan is led by Mahathir Mohamad, who was prime minister from 1981 to 2003 as UMNO and BN leader.
"As UMNO president and the Barisan Nasional chairman, I took full responsibility for the result for the 14th general election," Najib said in the statement.
He said earlier that he would announce the decision upon returning to the country as well as his plan for the future, adding the decision is only to "make sure UMNO and Barisan Nasional would come back strong and regain the trust of the people."
The former prime minister, who has been embroiled in the 1MDB state fund scandal but denied any wrongdoing, has apologized "for any shortcomings and mistakes" in other tweets.
Najib, along with several heavyweights of UMNO, attended a low-key celebration of the party's 72nd anniversary at the UMNO headquarters in Kuala Lumpur on Friday. But he broke the tradition of speaking to the party members and did not speak to the media either.
The new Prime Minister Mahathir has said that if Najib were found to do something wrong, "he will have to face the consequences."
The new government is expected to hold a press conference and unveil the new cabinet line-up on Saturday.