Wickremesinghe said he would hold talks with President Maithripala Sirisena after coming through the battle by 122 votes to 76.
Sirisena has criticised the prime minister's handling of the economy and has in the past called on Wickremesinghe to stand down.
Thirteen members of Sirisena's Sri Lanka Freedom Party (SLFP) joined opposition lawmakers to vote against the prime minister, whose United National Party is the largest single party in the 225-member assembly.
"We have started a lot of work and made many changes -- democracy, economy and rural development," the prime minister told reporters after the vote.
"We also faced problems such as drought, cost of living and some economic issues, we will study both positives and negatives and move forward."
Wickremesinghe said he will meet Sirisena soon to discuss how to proceed with their government, which was formed in 2015.
SLFP ministers were among the rebels who voted against the government.
"We will continue to be in the government," Sports Minister Dayasiri Jayasekara, one of the 13, said after the vote.
But MP Hector Appuhamy, a Wickremesinghe supporter, said: "If they have any backbone, they should now leave the government."
Sirisena joined hands with Wickremesinghe's United National Party to end strongman president Mahinda Rajapakse's decade in power in a January 2015 election.
Sirisena publicly blamed Wickremesinghe, a free-market champion, for mismanaging the economy as Sri Lanka's growth plunged to a 16-year low of 3.1 percent in 2017.
A large bond scandal at Sri Lanka's central bank -- which fell under Wickremesinghe's portfolio until Sirisena took it away last month -- deepened the acrimony between the two leaders.
The prime minister was cleared of any wrongdoing but was accused of trying to protect a former central bank governor, who is a suspect in the insider-trading scam.
The no-confidence motion was moved by an opposition group led by Rajapakse, who humiliated the governing coalition in a surprise blitz at the local elections in February.
The former strongman president wants a national election slated for 2020 brought forward.
Presidential powers to sack the government and call early elections were removed through a constitutional amendment introduced in the early days of the Sirisena-Wickremesinghe coalition.
Coalition tensions have also escalated over Sirisena's attempts to extend his presidential term by a year until 2021, a move that was rejected by the Supreme Court.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)