The city which is about 20 kilometres (12 miles) from the frontline of the conflict in eastern Ukraine, which was seized by Russian-backed separatists, was celebrating the fifth anniversary of it's liberation from the rebels.
"We must now thoroughly redistribute the maximum of our attention to the Donbass," Zelensky, 41, told journalists at the port, referring to the region controlled by the rebels.
"This is our land, our territory and we want people from the other side, in the temporarily occupied territories, to see that Ukraine is flourishing here."
The president, a former comedian and TV star whose landslide election victory shook the political establishment, said he had a plan for the "nearest future" — that would not take five years.
He also said his main goal was to end the war in eastern Ukraine and return all areas to under the control of Kiev.
"There are our people, we are all Ukrainians," he stated.
During the military exercises, Zelensky sat on the deck of search and rescue ship and watched officers of the Ukrainian national guard, border guard, sappers and divers demonstrating their skills.
More than a hundred officers, at least three camouflaged guard boats, inflatable boats and a helicopter were involved.
After the official part of the visit, Zelensky visited the city centre, took selfies with people and even ran through a park fountain with children.
Earlier some 10,000 people had attended a military parade in the city to mark five years of being free from separatist control.
"The lesson for Donbass is that when Russian forces leave, peace begins," Kurt Volker, US special envoy for Ukraine, tweeted on Friday.
Volker said Mariupol had been largely peaceful in recent years "except for when Russian forces shelled it, killing dozens".
In 2015 rocket strikes hit the residential district, killing 30 people and wounding more than a hundred.
Kiev and its Western backers accuse Russia of funnelling troops and arms across the border in the east to fan the flames of the conflict.
Moscow has denied the claims despite overwhelming evidence to the contrary.
Some 13,000 people have been killed in this war since 2014.