Mattis accused Russia of seeking to "redraw international borders" by force and said a new military aid package agreed with Ukraine would help Kiev defend itself.
"Mr President, we continue to support Ukraine and remain committed to building the capacity of your armed forces," Mattis said after meeting Ukrainian President Petro Poroshenko for talks.
He said Washington had recently approved delivery of military equipment worth $175 million (148 million euros) to Ukraine that would boost its defence capacities.
This brings total non-lethal military aid, which includes radars and uniforms, to $750 million since 2015, although the issue of lethal weaponry is still under consideration, he added.
"On the defensive lethal weapons, we are actively reviewing it," he said.
"Defensive weapons are not provocative unless you are an aggressor. And surely Ukraine is not an aggressor."
Kiev has for several years pushed for help with lethal weapons, particularly anti-tank missiles, and the US Senate in 2015 approved a bill that allowed such deliveries.
However, the decision was ultimately opposed by the former administration of Barack Obama.
Mattis' visit to Kiev coincided with country festivities for Independence Day.
Twenty-four US soldiers participated in the military parade together with Ukrainian troops for the first time in the country's history.
"I am thankful to our American partners, first of all for the effective military aid from the first moments of Russian aggression," said Poroshenko. "We decided to expand this cooperation."
"Discussing these issues requires silence before the final decision," Poroshenko added, regarding the supply of lethal weapons. "I can say that as president I am pleased with the discussions."
"The United States stands with Ukraine," Mattis said, accusing Moscow of "seeking to redraw international borders by force, undermining the sovereign and free nations of Europe."
Sanctions against Russia "will remain in place until Moscow reverses the actions that triggered them," he said.
Kiev is battling a pro-Russian insurgency in the eastern regions of Lugansk and Donetsk.
Parts of these regions declared independence in 2014, shortly after Moscow seized the Crimean peninsula in the Black Sea from Ukraine.
The United States and the European Union have unleashed a series of punishing economic sanctions against Russia.
More than 10,000 people have died in the conflict. Ukraine and the West accuse Russia of orchestrating and fuelling it with weapons and troops brought across the porous border.
A series of ceasefires has dampened the violence, but not ended it.
The latest truce was agreed this week and will go into effect Friday ahead of the start of the new school year.