The United States is seeking to bolster allies and partners in Asia and the Pacific in the face of growing Chinese military and economic power.
Mr Mattis arrived in Ho Chi Minh City and will visit the former US air base at Bien Hoa, where he will inspect operations to clean up Agent Orange, the toxic defoliant used by US forces in the Vietnam War.
He will also hold talks with his Vietnamese counterpart, Ngo Xuan Lich.
Administration officials have been attempting to instil some coherence to US strategy in the region following a rapid increase in Chinese belligerence and military power.
Vietnam is seen as a key bulwark because of its resistance to Chinese expansion in the South China Sea and its determination to hold onto disputed waters and territories.
Three months after Mattis’s visit to Hanoi in January, a US aircraft carrier made its first visit to a Vietnamese port since the war.
The sight of a US carrier battle fleet at Danang sent a signal to Beijing that the US intended to hold its ground in the South China Sea, despite China’s growing power in the region.
Mattis said at the time that new Chinese bases on reclaimed reefs were part of a deliberate strategy of intimidation and coercion.
He had originally intended to visit Beijing as well as part of the current Asian trip but that was cancelled amid escalating tensions over trade and competing war games in disputed waters.
Vietnam has sought to strengthen military ties with the US and a range of other powers, from Moscow and Delhi to Canberra and Tokyo, while at the same time avoiding an open breach with China.
The leadership in Hanoi has adopted a pragmatic strategy, giving ground to China when it sees no alternative but standing firm when it can, and encouraging navies from around the world to conduct “freedom of navigation” missions off its coast in waters that China claims as its own.
Vietnam’s perilous position between two superpowers also offers some opportunities.
It looks set to benefit from the trade war between China and the US as it seeks to replace Chinese exports with products of its own.
Hanoi has also used the China threat to leverage better ties with Washington and reduce US support for democratic reform that the Communist party saw as a threat to its legitimacy.