Humala secured scarcely enough support for his sixth cabinet in three years with 55 votes. Fifty-four lawmakers voted against his cabinet and nine abstained.
The vote was the third after a majority of lawmakers balked at the cabinet's ratification last week, part of a bid to pressure Humala on a raft of demands ranging from ministerial changes to the repeal of the pension law.
Passed in 2012 when Humala wielded more power in Congress, the pension law mandates independent workers to pay into a private pension fund or the state pension program.
Peru's private pension system is the most important source of investment capital in the country, managing some $39 billion.
After the law was passed, Habitat , a unit of Chile's Inversiones La Construccion, won the right to sign up all new contributors to the private system by offering the lowest fees.
The president of Humala's nationalist party, First Lady Nadine Heredia, said on Twitter that the party and its allies in Congress would back suspension of the independent worker rule in the pension law.
It is unclear how long the requirement would be on hold, or what impact it would have on Habitat.
Habitat declined to comment on the law's suspension until a formal decision by the government is taken.
Humala's previous cabinet also faced three votes before securing congressional approval in March. That marked the first time in more than a decade that the constitutional ratification requirement was not just a routine formality.
The latest political crisis emerged after Humala's power in Congress waned further. In late July six lawmakers left his party's political bloc in Congress, leaving it with a one-vote edge over the main opposition party.