The World Bank said on Tuesday that the law, which imposes the death penalty for certain same-sex acts, contradicted its values and that it would pause new funding until it could test measures to prevent discrimination in projects it finances.
The World Bank has an existing portfolio of $5.2 billion in Uganda, although these projects will not be affected.
The anti-LGBTQ law, enacted in May, has drawn widespread denunciation from local and international rights organizations and Western governments, though it is popular domestically.
Museveni said in a statement that Uganda was trying to reduce its borrowing in any case and would not give in to pressure from foreign institutions.
"It is, therefore, unfortunate that the World Bank and other actors dare to want to coerce us into abandoning our faith, culture, principles and sovereignty, using money. They really underestimate all Africans," he said.
Museveni said that if Uganda needed to borrow, it could do so from other sources, and that oil production expected to start by 2025 would provide additional revenues.
He added he hoped the World Bank would reconsider its decision.
In June, the United States imposed visa restrictions on some Ugandan officials in response to the law. President Joe Biden also ordered a review of U.S. aid to Uganda.