Jeff White was handed a pass that proclaimed "H8GAYS" when he boarded a recent Delta Air Lines flight from Florida to New York, the Washington Post reported.
White, a student at the University of West Florida, said he was left "extremely uncomfortable" upon reading the code.
"At first I didn't think I read it right," White said. "I was worried that another customer might think I somehow picked that code. If I were a gay male, I might have thought that a Delta worker purposely gave me that code, and that would have made me extremely uncomfortable."
A Delta spokesman apologised for any "concern or misunderstanding" that its code may have caused.
"These confirmation codes are computer-generated and are completely random," the spokesman said. "We will make every effort to ensure that a similar combination does not occur in the future."