A consultant lost his job at a Norfolk hospital after carrying a sample of HIV-infected blood in his hand luggage on a flight, a High Court judge heard.
Tubonye Harry, from the James Paget Hospital in Gorleston, was returning from Nigeria where he did private work.
Mr Justice Burnett said the sample should have been packed in the aircraft's hold.
But he terminated a suspension imposed on Dr Harry by the General Medical Council, calling it "disproportionate".
Dr Harry, a genito-urinary specialist, had also broken rules by opening a package containing the sample at home instead of in a laboratory, the judge added.
He was dismissed by James Paget managers earlier this year.
Details of the case emerged as the judge ruled on a dispute between Dr Harry and the GMC, which registers doctors, at a High Court hearing in London.
Dr Harry, who also faced a number of other allegations relating to his work, had been suspended for 18 months pending the outcome of GMC disciplinary proceedings, the judge was told.
But he argued that the GMC's 18-month interim suspension was unfair and unnecessary, and the judge agreed.