We have these descriptions of Onion Head from the commodities list:
The Onion Head flower is native to HIP 55118, and its seeds contain the well-known psychedelic narcotic. Illegal in most jurisdictions.
A genetically altered strain of the Onion Head flower, chemically changed to circumvent federal laws. This strain has been designed to survive in harsher climates, but its seeds contain the same well-known psychedelic narcotic. Federal lawmakers are working fast to legislate against this new breed.
Here on 21st century Earth, "psychedelic drugs", like LSD, and "narcotic drugs", like heroin, are two separate drug classes, never found in a single drug and attempting to combine the two effects is usually fatal.
On that basis, it sounds like the plant has naturally-occurring ingredients that somehow "safely" combine the two effects. I'm not entirely sure how something can both deaden the senses and stimulate hallucinations, but this plant can apparently do that, and in a non-lethal fashion. However, due to the hazardous nature of space and the relative ease of access to lethal weaponry on board a spacecraft, the use of hallucinogens while operating spacecraft is very strongly discouraged in most systems, even those in which onionhead is legal.
There are three other strains of Onionhead available on different planets, plus the original strain:
Onion Head: Kappa Fornacis
Lucan Onionhead: Tanmark
Onionhead Alpha Strain: Xelabara
Onionhead Beta Strain: HIP 112974
Note that this list does not include the original homeworld of the plant, HIP 55118, a system which does not contain any Earth-like planets (though does have several waterworlds); no Onionhead variety has ever been sold from any station in the HIP 55118 system, so it is presumably now locally extinct. The etymology of the name is apparently linked to its physical appearance: the flower head containing the drug is poppy-like in appearance, but more closely resembles an onion than a traditional poppy.