if adultery is prohibited in hinduism, then how come shiva (married to parvati) had a baby with mohini?

Lord Shiva and Lady Mohini did not have intimate relations to have son ayappa. Initially I also used to think so. But actually, Vishnu took form of mahatripurasundari that is parvati herself. Shiva embraced her. His seed fell and took form of god maha-shaasta. Lord Ayappa is considered avatar of god maha-shaasta by some traditions. Maha-shaasta is only figuratively son of Vishnu-mohini because mohini did not literally get pregnant and give birth to him etc You can read more detailed story in user Tezz's answer here. https://hinduism.stackexchange.com/questions/10661/why-and-how-did-lord-shiva-fall-in-love-with-mohini

Anyway, even if Vishnu had not taken form of parvati and even if Mohini and Shiva had literal intimate relationship, I don't think Shiva would have committed adultery, at least not how hinduism seems to understand 'adultery'.

according to the garuda purana, in narakha (hell), you are obviously punished if you commit adultery... e.g, andhatamtrsam.

This might be translation issue. Which sanskrit word was translated as adultery? Do any of the dharmashastras explain definition of that word? We can not assume that word meant what we now mean by adultery with its roman monogyny based baggage.

I may be wrong but it looks to me, in Hinduism 'adultery' for a man is when he has intimate relationship with somebody else's wife. Because when man has intimate relationship with a virgin woman, she becomes his wife by gandharva vivaha. (https://hinduism.stackexchange.com/a/924). Mohini was not married to any man AFAIK, so that is not adultery. In Hinduism man is allowed to have multiple wives (as almost every notable man in scriptures has multiple wives, nowhere we see they being called adulterer for that) and one of the ways to get married is to have intimate relationship with virgin woman (kanya). So it looks to me only way man can commit adultery in Hinduism is to have intimate relations with someone else's wife eg. Lord Indra and Ahalya (Both suffered punishment for that act.)

TL:DR Lady Mohini and Lord Shiva don't seem to have had literal intimate relations and even if they had, it doesn't seem it would be considered 'adultery' in Hinduism.

/r/hinduism Thread