The agreement was signed on Wednesday between the state-controlled Konstrukta Defence and Ukraine, the ministry said in a statement.
"Agreement was reached after weeks of intense negotiations," said Defense Minister Jaroslav Nad. "Situation in Ukraine demands our full attention, expertise and sincere interest.”
The Zuzana 2 howitzers use 155-mm rounds and have a range of 40-50 km (25-30 miles) depending on the ammunition type with automatic loading of ammunition feature.
The announcement follows a meeting between Slovakia President Zuzana Caputova and her Ukrainian counterpart Volodomyr Zelenskyy.
"Honoured to be in Kyiv today with @ZelenskyyUa. The people of #Ukraine are paying a huge price for freedom. We stand by you & your nation, Mr President!" Caputova tweeted on Tuesday.
Slovakia is one of the three EU members exempt from the latest EU ban on Russian oil imports by the end of 2022.
The landlocked countries of Hungary, the Czech Republic, and Slovakia will not be part of the ban, which covers oil that arrives from Russia by sea, and not by pipeline.