He and members of the team went on to become national celebrities overnight. But as head of the team, Mr Virachai has not stopped at that.
Mr Virachai is currently busy meeting people in the provinces to gain more insight into the border dispute case.
For years he did a lot of homework to prepare for the legal battle against Cambodia before he stepped into the ICJ in The Hague in April.
He and his team won plaudits for producing evidence that Cambodia allegedly used a falsified border map to back its request for an ICJ reinterpretation of the court's 1962 ruling on the Preah Vihear temple case.
The 1962 ruling granted Phnom Penh ownership of the Preah Vihear temple, but the court did not say at the time which country owned the area of 4.6 square kilometres surrounding the temple.
The area has since remained a source of dispute and is claimed by both countries.
Before the ICJ delivers its verdict on the case in October, the Foreign Ministry has asked Mr Virachai to explain the border case to the public in the major cities of each region - Bangkok, Chiang Mai, Khon Kaen and Songkhla. Forums have also been held at major universities in each region.
His first trip to Chiang Mai and then Khon Kaen received many commendations from the participants.
Mr Virachai told the audiences that he believed the World Court was unlikely to rule in favour of Cambodia's request for a reinterpretation of the 1962 ruling.
Cambodia's request can be deemed as an appeal and the ICJ should not consider an appeal in a case which is already final, Mr Virachai noted.
"It is likely that the court will come up with a middle-ground verdict which will be favourable to both sides so they can work together towards peace," Mr Virachai said.
While most of the audiences in Chiang Mai and Khon Kaen were students, it is expected that Mr Virachai's next journey, to the southern province of Songkhla, will draw even larger crowds, given that southern people are known to be particularly keen on politics and issues of national affairs.
However, the forums have not been broadcast on TV or radio despite the border dispute case having been of great interest to the public, according to observers.
At each forum, Foreign Ministry officials who accompanied Mr Virachai, distributed documents in cartoon format to have the technical and legal jargon involving the border case explained in layman's terms to make it easier for the audience to understand.
Mr Virachai stresses the Thai legal team is being given a free hand in dealing with the legal battle and that there is no political interference.When the press became less free
Celebrated journalist Jiraporn Charoendej passed away on Aug 27, 2013, her 56th birthday. She had been battling motor neurone disease.
Jiraporn came to public attention back in 2005 when she wrote a thesis which detailed how the media was prone to abuse and could be instrumental in sowing social divisions in Thai society. Her predictions proved to be prophetic, agreed close friends and veteran media figures.
Today, the mass media is divided and some outlets are frequently accused of distorting facts and delivering propaganda to make the wrong seem right.
At the same time, online media is playing an ever-expanding role in rousing people and triggering mass movements.
Jiraporn wrote a thesis on former prime minister Thaksin Shinawatra's weekly talk programme on radio while pursuing a master's degree at the faculty of journalism and mass communication of Thammasat University.
Jiraporn's close friends noted the distinctive observations made in the journalist's thesis. They agreed Jiraporn was extremely focused on putting together the thesis and the extensive research that went into it.
She worked and studied hard at the same time and finished the thesis in two years in 2005.
Her research might not have been the subject of such interest among media professionals had the Office of Graduate Studies of Thammasat University not recognised it as an outstanding thesis in 2006.
According to people close to her, Jiraporn listened to and transcribed all 52 episodes of Thaksin's talk programme throughout 2004 when he was prime minister.
She observed the then premier allegedly used the media to rebut accusations against his government and came down hard on media outlets which opposed him.
According to the thesis, the media was being manipulated.
In the thesis, the former premier was quoted as repeatedly making promises to deliver on his policies. Words of promise were most often used during the talk programmes monitored by the researcher.
At the same time, a media professional or columnist would be singled out and chided as being biased if he or she criticised the former prime minister's work based on what had been asserted as reliable information.
In the thesis, Jiraporn insisted she had analysed Thaksin's statements made during the programmes strictly on the basis of academic principles.
She confided with friends that Thailand was becoming fractured, with more and more people adopting the "us and them" mentality, and part of the problem could be traced back to one man.Jostling starts for power post
Somkiat Chayasriwong is due to retire as labour permanent secretary on Oct 1, and there are three likely candidates in the running to replace him.
They are Jirasak Sukhonthachart, secretary general of the Social Security Office (SSO); Nakhon Silpa-archa, director-general of Department of Skills Development; and Prawit Khiangphol, director-general of the Department of Employment.
Mr Jirasak is the oldest candidate and is due to retire next year. Mr Nakhon, a relative of former prime minister Banharn Silpa-archa, will go into mandatory retirement in two years and Mr Prawit in four years.
Mr Jirasak graduated with a bachelor's degree in political science from Thammasat University and later received a master's degree in social development from Kasetsart University.
Before he became secretary-general of the SSO, he was deputy permanent secretary for labour, director-general and deputy director-general of the Department of Employment, deputy secretary-general of the SSO, and head of the labour minister's secretariat.
Mr Jirasak has been working at the labour ministry since it was established in 1993, when Gen Chavalit Yongchaiyudh was the first labour minister.
Mr Nakhon, on the other hand, appeared to have achieved career advancement very early as he has climbed the career ladder to C-10 status faster than anyone else. He has been at the helm of almost every department in the ministry, but remains stuck at the C-10 level.
Unlike Mr Nakhon, Mr Prawit has maintained a steady pace in his career advancement. He rose methodically through the ranks and is now chief of the Department of Employment.
Mr Prawit has long retained close ties with Labour Minister Chalerm Yubamrung. Because of his humble style in dealing with his superiors, Mr Prawit was once referred to by Mr Chalerm as being the next labour permanent secretary.
"Here on my right side is Mr Somkiat, the current permanent secretary. And on the other side is Mr Prawit, the next permanent secretary," Mr Chalerm said when asked about the selection of the new permanent secretary.
Despite growing rumours that the new permanent secretary would be an outsider, Mr Chalerm has always insisted that he was ready to support an insider for the top post.
Mr Chalerm will forward to the cabinet his nomination of the new permanent secretary next month, according to a ministry source.
Still, the rumours that an outsider is likely to become the new permanent secretary might yet come true, if history is any indication.
Interior Minister Charupong Ruangsuwan was an outsider who was promoted to labour permanent secretary. So were former prime minister Somchai Wongsawat, Aphai Janthanajulaka and Somchai Chumrat.
One of the most likely outsiders to be a potential candidate this time is Phanu Uthairat, the Interior Ministry inspector-general.
Despite his impressive credentials, Mr Phanu has yet to win any important promotion in the ministry so far.
The source said Mr Phanu may be waiting in the wings to take the most coveted seat at the Labour Ministry.