“General Rajmund Andrzejczak submitted his resignation… on Monday,” his spokeswoman Col Joanna Klejszmit told the AFP news agency.
“Like any soldier, he’s entitled to resign without giving a reason,” she added.
Gen Piotrowski also tendered his resignation.
The daily Rzeczpospolita – one of Poland’s leading newspapers – reported that the two generals were in conflict with Defence Minister Mariusz Blaszczak about the politicisation of the military and a row over a Russian cruise missile over Poland late last year.
In May, Mr Blaszczak, said Gen Piotrowski failed to inform him last December that the unarmed missile had entered Polish airspace from Belarus and flown hundreds of kilometres before crashing in a forest.
The missile was only discovered in April by a member of the public, causing considerable embarrassment for the minister.
Mr Blaszczak and the two generals have not publicly commented on the Rzeczpospolita report.
On Sunday, Poles will be voting in what opposition leader Donald Tusk has billed as their “most important election since 1989 and the fall of communism”.
The populist, right-wing United Right coalition, led by the Law and Justice party of Jaroslaw Kaczynski is seeking a third term in office.
However, the gap between the right and centre has narrowed after an intensely bitter election campaign.
Poland has been a staunch supporter of Ukraine since Russia’s full-scale invasion began in February 2022, housing more than a million of Ukrainian refugees and providing Kyiv with more than $3bn (£2.4bn) in weapons.
But relations have frayed during the campaign over a Polish ban on Ukrainian grain imports.