LIMA, Peru—President Pedro Pablo Kuczynski, a market-friendly leader and one of Washington’s allies in Latin America, resigned Wednesday after a secretly recorded video appeared to show his allies offering to reward opponents with public contracts in exchange for not impeaching him.

Mr. Kuczynski, 79, said in a televised speech he was stepping down and had submitted his letter of resignation to congress, ending his presidency after just 19 months. His decision came in the wake of allegations of wrongdoing over his past business...