Chris Tun first fled Myanmar’s brutal military regime in 1989 as a student activist. He returned nearly a quarter-century later as a U.S. citizen and an executive at a global company, aiming to help foreign businesses set up in the country as it embarked on a historic shift toward democracy.

“The door was open,” Mr. Tun said. “We had to go back, we had to help.”

When Mr. Tun, 50, arrived in 2013 as a director at Deloitte Consulting (Myanmar) Ltd., the professional-services provider, the country was celebrating a new beginning after half a century of military repression and international isolation.

The democratic transition that had begun by 2011 was in its early stages, but many were hopeful of a better future. The U.S. lifted sanctions, garment factories opened, tourists streamed in, millions of citizens came online and exiles such as Mr. Tun returned.

This year, it all fell apart. The army staged a coup in February, taking the nation back to authoritarian rule. As security forces arrested hundreds of people and shot protesters, Mr. Tun decided he had to leave again, another stage in a personal journey that has mirrored the shattered promise of his native country. Many other expatriate workers and citizens have left the country, as foreign companies scale down operations amid a broader economic collapse.

“There was a lot of hope that these people didn’t want to go back into the stone ages,” Mr. Tun said of the generals leading the military junta.

Protesters held up portraits of Aung San Suu Kyi during a protest in February after the military staged a coup.

Protesters held up portraits of Aung San Suu Kyi during a protest in February after the military staged a coup.

Photo: Lillian suwanrumpha/Agence France-Presse/Getty Images

Before Mr. Tun first fled in 1989, he was part of a wave of student demonstrations against military rule. The rolling protests were suppressed with brutal force, as security forces fired on demonstrators and arrested their leaders. Some, like Mr. Tun, were forced into hiding and exile.

Mr. Tun traveled to Thailand, then Singapore, where he signed up for a computer programming course while working night shifts in a plastics factory. He met his now-wife, Ruth, while studying there, and they moved back to Myanmar together in 1997. In Myanmar, Mr. Tun started a business developing computer software, but he said he found himself under pressure to collaborate with people who were working with the military junta. He left again in 2001, this time for the U.S., where a community of Myanmar exiles helped him get asylum.

Living in Daly City, Calif., he worked for a while for a U.S. consulting firm on technology projects, and eventually took a job in 2008 with Deloitte, where he took on assignments such as helping to build a centralized data warehouse for a U.S. federal agency.

By 2012, Mr. Tun’s work frequently took him to Washington, D.C., where a friend introduced him to U.S. business and government officials who wanted to know more about the democratic shift under way in Myanmar, he said.

After five decades of authoritarian rule, the country was opening up as the military sought to end Western sanctions and reduce their reliance on China. A nominally civilian government took power, freeing political prisoners and withdrawing some media restrictions. The U.S. began lifting sanctions in the hope of a democratic transition.

Chris Tun, in his recently rented apartment in Pleasanton, Calif., last month.

Chris Tun, in his recently rented apartment in Pleasanton, Calif., last month.

Photo: Jason Henry for The Wall Street Journal

American companies saw an opportunity. In 2012, Mr. Tun helped coordinate a trip with dozens of business executives from U.S. companies including Chevron Corp., arranging meetings with members of Myanmar’s parliament and local businesses. The U.S. executives left excited, telling Mr. Tun that Myanmar had the potential for growth for 20 years, he said.

“Myanmar was the shiny new coin,” said Frances Zwenig, a former executive at the U.S.-ASEAN Business Council, a trade group, who helped coordinate the trip with Mr. Tun.

Senior partners at Deloitte in Asia asked if Mr. Tun would move back to Myanmar to help establish a local consulting unit to assist foreign businesses seeking to enter the country. Mr. Tun jumped at the chance.

“He, like others, represented the promise of a new Myanmar that was springing forth,” said Derek Mitchell, who from 2012 to 2016 served as the first U.S. ambassador to Myanmar in more than two decades.

Chris Tun, in orange in center, at a training for youth affiliated with the National League for Democracy political party in 2016, not long after it won Myanmar’s first free and fair election in generations

Chris Tun, in orange in center, at a training for youth affiliated with the National League for Democracy political party in 2016, not long after it won Myanmar’s first free and fair election in generations

Photo: Chris Tun

For the next eight years, Mr. Tun had a front-row seat as changes swept his country. Elections in 2015 brought the pro-democracy political party of Nobel laureate Aung San Suu Kyi to power and hundreds of new lawmakers were sworn in, including former political prisoners. Mr. Tun organized training sessions for some, one of which was on how to assess the prospects of a Chinese-backed port project involving substantial amounts of debt, he said. Myanmar’s democratically elected government later pushed to reduce the scale of the port project.

Eventually, he moved on from Deloitte, working as an executive at a conglomerate with interests including cement manufacturing, hotels and gas stations, before taking a job in 2019 at one of the country’s largest privately owned banks to direct digital banking. Online transactions were booming in Myanmar as millions of people gained cellphone and internet access.

Chris Tun, center, attending the grand opening of Deloitte’s Myanmar unit in 2016.

Chris Tun, center, attending the grand opening of Deloitte’s Myanmar unit in 2016.

Photo: Chris Tun

The exciting times were short lived.

On the morning of Feb. 1, he was leaving home for work when his wife, who was watching the news on TV, yelled out that the army had seized power. Mr. Tun was shocked, but hoped this was a temporary power play by the military.

Mr. Tun worked with others to arrange back-channel discussions between business and political officials close to the military and members of Ms. Suu Kyi’s political party, he said. Ms. Suu Kyi herself was detained, along with other senior government officials. “I was hopeful that this was a misunderstanding that could be resolved,” he said.

The military doubled down. The talks sputtered when security forces cracked down violently against protesters, according to Mr. Tun and another person, who helped coordinate the negotiations and is now in hiding from the military in Myanmar.

Dozens of pro-democracy leaders, some of whom Mr. Tun said he had been close to, were detained. A protest movement emerged and included employees in the banking sector, who were determined to boycott work and pressure the junta by shutting down the financial system.

Mr. Tun went to the office most days so that when military officials called, he could tell them he was maintaining operations as best he could, he said. In reality, he didn’t have much to do, as the military had largely shut down the internet, effectively killing online banking, he said.

Friends who had fled the country called from Thailand, warning he could be at risk of arrest because he was close to detained government officials and pro-democracy activists.

Chris Tun talks with his wife, Ruth, who is awaiting her green card in Singapore, at least twice a day.

Chris Tun talks with his wife, Ruth, who is awaiting her green card in Singapore, at least twice a day.

Photo: Jason Henry for The Wall Street Journal

On the streets, the military was using lethal force, killing dozens of protesters. Strikes paralyzed the ports and factories emptied out as workers took to the streets. Late in March, a young employee at his bank who joined the protest movement was shot dead by soldiers, Mr. Tun said, hardening his resolve to leave. 

In mid-April, Mr. Tun and his wife made their way to the international airport in Yangon, Myanmar’s largest city, with few belongings other than their clothes, laptops and their pet dog, Carly, he said. They stood apart at check-in and immigration, where Mr. Tun thought he was at most risk of being plucked out of line and arrested. He was waved through.

As the flight took off, he and his wife exchanged a high-five. In mid-May, after a few weeks in Singapore, Mr. Tun arrived in Pleasanton, Calif., to begin a new life. He founded a software-development firm that will work with startups to grow their businesses.

Of his dreams of helping Myanmar transform, he said: “I cannot even think of it.”

Police officers arrested a protester during a demonstration against the military coup in February.

Police officers arrested a protester during a demonstration against the military coup in February.

Photo: SOPA Images/Zuma Press

Write to Jon Emont at jonathan.emont@wsj.com