Peter Lewis, who was formerly HSBC's global head of equities trading, had claimed that he was sacked by the bank in 2004 because he was gay, and was suing his former employers for Â£5 million.
However, the Employment Appeals Tribunal this week agreed that Mr Lewis's sexual orientation had not influenced HSBC's decision to fire him following allegations of sexual harassment made by a colleague.
The colleague alleged that Mr Lewis made sexual advances towards him in the changing rooms of the bank's gym at its London headquarters.
"HSBC has always maintained that Mr Lewis was dismissed for gross misconduct following a complaint of sexual harassment made against him by another member of staff and for no other reason,'' commented bank spokesman Pierre Goad.
"HSBC is pleased Mr Lewis's claim has been rejected once again."