Mattis, who visited the tense Demilitarised Zone during a trip to South Korea, criticised the North's "pursuit of nuclear weapons...
Tension has flared on the Korean peninsula as US President Donald Trump and the North's ruler Kim Jong-Un have traded threats of war and personal insults that sparked global alarm.
Mattis, who visited the tense Demilitarised Zone during a trip to South Korea, criticised the North's "pursuit of nuclear weapons... in order to threaten others with catastrophe".
But he maintained that the US was still committed to a "diplomatic solution".
"As the US Secretary of State Tillerson has made clear, our goal is not war but rather the complete, verifiable and irreversible denuclearisation of the Korean peninsula," he said in the truce village of Panmunjom.
Mattis also stressed he and his South Korean counterpart Song Young-Moo had "made clear our mutual commitment to a diplomatic solution to address North Korea's reckless, outlaw behaviour".
The remarks came a day after Mattis had said Washington was "not rushing to war" and was looking for a "peaceful resolution".
He is set to hold annual defence talks with Song on Saturday during the two-day trip, which comes ahead of a planned trip by Trump to the South -- a key US ally in Asia -- next month.
Trump is set to visit Seoul from November 7 to 8 with all eyes on his message to the North and Kim.
The isolated North carried out its sixth nuclear test in September and has launched several missiles in recent months potentially capable of reaching the mainland of its "imperialist enemy" the US.
The moves, staged in violation of UN resolutions banning the North from any use of atomic and ballistic technology, prompted new US-led UN sanctions against the impoverished state.
Pyongyang reacted angrily to the new sanctions and Trump's recent remark that "only one thing will work" with the North fuelled concerns of a potential conflict.
But even some Trump advisers say US military options are limited when Pyongyang could launch an artillery barrage on the South Korean capital Seoul -- only around 50 kilometres from the border and home to 10 million people.
The North says its atomic weapons are "treasured sword" to protect itself from potential invasion by the US. Its missile technology has made significant progress under Kim, who took power after the death of his father in 2011.
But following a flurry of nuclear and missile tests, the North has gone more than a month without such provocations, leaving Seoul and Washington officials perplexed about its intention.
Also in a rare humanitarian gesture at a time of heightened tension, the North said Friday it would return a South Korean fishing boat captured after crossing the sea border.
The ship, captured last Saturday after "illegally" crossing the border off the east coast, would be repatriated Friday evening "from the humanitarian point of view", state-run news agency KCNA said.
The North has been accused of abducting many South Korean fishermen and Japanese civilians in the 1960s, 70s and 80s to use some of them as tutors to train North Korean spies to be sent abroad.