The soldier was initially given an 11-day prison sentence. The punishment was later converted to being confined to base for the same duration - after relatives talked to the media and a lawmaker wrote to the defense minister about the case.
The military said early Tuesday that the soldier, whose name has not been released, "violated rules and regulations," which required him to be disciplined.
In a Facebook post later in the day however, Spokesperson Brigadier-General Moti Almoz withdrew the punishment and acknowledged the army's "mistake" in handling the situation.
"The bottom line is that we made a mistake," wrote Almoz. "The IDF will continue to keep kosher, but won't probe another soldier's sandwich.
"There is tension in Israeli society and different stances and opinions exist," he continued. "In the IDF, there is room for everyone."
Israel's army maintains kosher kitchens on its bases.
Israel Radio says the soldier, who moved to Israel from Boston recently, was unaware of the army's strict dietary restrictions and was merely snacking on a lunch his secular grandmother had made him.
Associated Press contributed to this report.