In a sweeping speech, which harked back to the bloody war that defined both nations but also looked to the future, Obama said that "upholding rights is not a threat to stability".
Obama calls for peaceful settlement of South China Sea disputes
Vietnam ruthlessly cracks down on protests, jails dissidents, bans trade unions and controls local media.
But the US leader said bolstering rights "actually reinforces stability and is the foundation of progress", in his speech to a packed auditorium including Communist Party officials.
The visit is Obama's first to the country and the third by a sitting president since the end of the Vietnam War in 1975. Direct US involvement in the conflict ended in 1973.
Obama's visit has formally reset the relationship between the former foes with the lifting of a US arms embargo.
Trade has dominated the trip, with multi-billion-dollar deals unveiled, as well as further endorsement by both sides of the planned Trans-Pacific Partnership (TPP).
Immediately after his speech, Obama flew to Vietnam's boisterous southern commercial hub Ho Chi Minh City, where he will meet tech-startup entrepreneurs later on Tuesday.
He has been cautious to avoid hectoring his hosts -- an increasingly important regional ally -- on human rights.
"Vietnam will do it differently to the United States," Obama said.
Obama announces full lifting of Vietnam arms embargo
"But these are basic principles that we all have to try to work on and improve," he added, referring in particular to the importance of a free media.
His speech, punctuated with humourous asides and references to Vietnamese culture and history, was greeted with warm applause and cheers.
Earlier Obama met civil society leaders, including some of the country's long-harassed dissidents.
One of those present was Mai Khoi, a pop star dubbed Viatnam's 'Lady Gaga' who was recently barred from standing as an independent in legislative elections.
She said she had asked Obama to use America's alliance with Vietnam to push for "measurable improvements, not just rhetoric and formal agreements".
But in a country where state control remains the default response, authorities also stopped a number of prominent activists from meeting Obama.
Nguyen Quang A, a veteran dissident, told AFP he was bundled into a car by "plainclothes security men" and released only after Obama had left for the commercial capital.
Washington has trailed the three-day visit as a chance to cement ties with Vietnam, a fast-growing country with a young population seen as a key element in America's diplomatic pivot to the Asia-Pacific.
Crowds have enthusiastically welcomed the US leader wherever he has gone, including late Monday at a streetside restaurant where he supped beer and a local noodle soup speciality.
The US President alluded in his speech to the lingering shadow of the war, recognising the enduring "ache" for the families of the millions of Vietnamese and almost 60,000 Americans who died.
But looking forward, he said the new relationship founded on economic, educational and security bonds showed how nations can reshape their histories and "advance together".
The tariff-slashing TPP, he added, would help Vietnam "unleash the full potential of your economy."
Obama's scrapping of the weapons embargo is seen as a major boost for Hanoi, which shares American fears over Chinese expansionism in the disputed South China Sea.
Chinese media slam US lifting of Vietnam arms embargo
Chinese state media on Tuesday slammed the move, saying it was aimed at Beijing.
Obama vowed American support to keep sea routes open for all.
"Big nations should not bully smaller ones, disputes should be resolved peacefully," he said to the delight of his audience in a country where anti-China sentiment is growing.
China claims almost all the South China Sea and has rattled neighbours with a series of reclamation and construction projects -- including airstrips -- on reefs and islets.
Vietnam and three other countries, plus Taiwan, also have claims to parts of the sea.
The United States takes no position on the competing claims but asserts freedom of navigation and flights in the sea and has sent warships near Chinese-held islets.
Obama said the US would help Hanoi with military equipment to boost the capacity of its coastguard and "enhance maritime capabilities".
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ