Pyongyang on Thursday announced it was finalising a plan to fire four missiles near the US territory of Guam.
Earlier, President Donald Trump said North Korea should be "very, very nervous" if it acted against the US.
He said the regime would be in trouble "like few nations have ever been" if they do not "get their act together".
Tensions have escalated rapidly in recent weeks after North Korea tested two intercontinental ballistic missiles in July.
It was further angered by a subsequent UN decision to increase economic sanctions against it.
North Korea has said it will finalise a plan in days to fire medium-to-long-range rockets towards Guam, the small Pacific island where US strategic bombers are based, along with more than 160,000 US citizens.
There has been no indication that any attack on the Pacific island is imminent.
Mr Mattis, speaking in California late on Thursday, said it was his job as defence secretary to be ready for conflict.
But he said the diplomatic effort, under Secretary of State Rex Tillerson and UN Ambassador Nikki Haley, "has diplomatic traction, it is gaining diplomatic results".
He did not provide any further details on what diplomatic efforts were under way. However, the UN Security Council agreed fresh sanctions against North Korea on Saturday.
Mr Mattis said: "The tragedy of war is well enough known. It doesn't need another characterisation beyond the fact that it would be catastrophic."
When asked about US military plans for a potential conflict, Mr Mattis said the country was ready, but "I don't tell the enemy in advance what I'm going to do".
Speaking on Thursday at his golf club in Bedminster, New Jersey, Mr Trump suggested his own statements on North Korea - where he threatened them with "fire and fury the likes of which the world has never seen" - had not been tough enough.
He also railed against previous US administrations for being too weak on North Korea and again chided the North's closest ally, China, saying it could do "a lot more".
He said: "I will tell you this, if North Korea does anything in terms of even thinking about attack of anybody that we love or we represent or our allies or us they can be very, very nervous.
"I'll tell you why… because things will happen to them like they never thought possible.
"I will tell you this, North Korea better get their act together or they're gonna be in trouble like few nations have ever been."
However, he added that the US would always consider negotiations.
China's state-run Global Times newspaper - often dubbed a Communist Party mouthpiece - wrote that China should stay neutral if North Korea launches an attack that threatens the US.
But it also said that if the US and South Korea attack North Korea with the intention of forcing regime change, then China must intervene to prevent it.
Meanwhile, Australian Prime Minister Malcolm Turnbull said his nation would be prepared to join a conflict against North Korea if the United States came under attack.
Australia would honour its commitment under the 1951 Anzus Treaty, he said, "as America would come to our aid if we were attacked".
What is the Anzus Treaty?
- It is a security agreement signed by Australia, New Zealand and the US in 1951.
- The treaty is designed to act as a deterrent against aggression from other nations.
- Under the agreement, signatories are compelled to "consult" and "act to meet the common danger" if one is attacked.
- However, experts have said its precise application could be open to interpretation.
- Australia has invoked the treaty just once, in 2001, when it joined US troops in Afghanistan after the 9/11 attacks.
- The US and New Zealand suspended obligations to each other in the 1980s.