He was using the website to advance his career at a cost to the company: "In effect what you were saying was 'what a terrible place this is but what a great job I've done'," BG Group lawyer Ian Gatt QC, is reported saying.
Mr Flexman said he should have put more thought into the content of his profile but that he had a right to post his CV publicly.
"But did I do it to further my career? That's absolute nonsense."
On his return to work he was handed a list of disciplinary charges and told he could be sacked, Reading Employment Tribunal heard.
The dispute led to Mr Flexman's resignation in June, reported the website.
Employment law expert Max Whitehead of Whitehead Group Employment Solutions said it was unlawful to treat anybody differently because they were seeking employment.
However, employers were entitled to expect loyalty from staff and if the employee knowingly published confidential information in his online CV, the dismissal may have been justified.
"If the employee breached the trust or confidence to such a degree, that's reason for dismissal," he said.
LinkedIn was a networking site so CV details were required in order to find like-minded people, said Madison Recruitment chief operating officer Julie Cressey.
However, there were boundaries to consider when posting information online: "It depends on what he wrote and how he framed it," she said.
The case highlighted the need to be careful what information you put online, said Drake Recruitment Agency Hamilton branch manager Christine Haigh.
"It's not something that should happen but it is public property like Facebook so you've got to be careful," she said.
However, it wasn't unusual for an employee to be looking at other career opportunities, as 80 per cent of the job market are looking for work, she said.
The hearing is continuing.