It has been working to develop a nuclear-tipped missile capable of striking the US mainland, and experts say a test last Sunday of a new missile was another important step towards that aim.
"We are going to continue to work the issue," Mattis told a Pentagon news conference.
"If this goes to a military solution, it's going to be tragic on an unbelievable scale. So our effort is to work with the UN, work with China, work with Japan, work with South Korea to try to find a way out of this situation."
The remarks were one of the clearest indicators yet that President Donald Trump's administration will seek to exhaust alternatives before turning to military action to force Pyongyang's hand.
The United States, which has 28,500 troops in South Korea to guard against the North Korean threat, has called on China to do more to rein in its neighbour.
Mattis appeared to defend China's most recent efforts, even as he acknowledged Pyongyang's march forwards.
"They [North Korea] clearly aren't listening but there appears to be some impact by the Chinese working here. It's not obviously perfect when they launch a missile," Mattis said, when asked about Sunday's launch.
South Korea has said the North's missile programme was progressing faster than expected, after Sunday's test considered was successful.
- AAP