Why did Daksha hate Shiva, though Shiva is his son-in-law and one of Trimurti?
According to Shiva Purana, Daksha disliked Shiva due to the latter failing to properly respect him during a yagna.
However, there's more background to this as well.
Daksha, in addition to being a son of Brahma, was also a King, with a royal lifestyle; and being a King he wanted to use his daughters' marriages to increase his influence and power through marriage alliances with influential folks.
However, Sati, his youngest daughter had always been interested only in marrying Shiva. Daksha strongly disapproved of this as Shiva was an ascetic, and his followers consisted of ghosts, demons, ghouls and goblins. At this point in the tale, Daksha does not seem to be aware of Shiva being a "Supreme God".
Despite Daksha's disapproval, when Sati's swayamvara (a ceremony in which a bride can choose her own husband) was held, she chose Shiva and Daksha was powerless to stop the wedding. Leading to Daksha's hatred of the ascetic Shiva growing even stronger because he was now his son-in-law.
As per Shrimad Bhagavatam, it is because Lord Shiva didn't show proper respect to Daksa Prjapati, at an occasion of Yajna.
Dakṣa was adequately welcomed by the president of the great assembly, Lord Brahmā. After offering Lord Brahmā respect, Dakṣa, by the order of Brahmā, properly took his seat. [SB - 4.2.7]
Before taking his seat, however, Dakṣa was very much offended to see Lord Śiva sitting and not showing him any respect. At that time, Dakṣa became greatly angry, and, his eyes glowing, he began to speak very strongly against Lord Śiva. [ SB - 4.2.8 ]
Being the Prajapati, he was of course a respectable man. So when every one else showed proper respect and good mannerism but not his own son in law Siva, he got angry on Him and hated Him. Anyway, he probably never liked Shiva because He was a smashan dweller. So that occasion made him furious and he poured his heart out:
I had no desire to give my daughter to this person, who has broken all rules of civility. Because of not observing the required rules and regulations, he is impure, but I was obliged to hand over my daughter to him just as one teaches the messages of the Vedas to a śūdra. [ SB - 4.2.13 ]
He lives in filthy places like cremation ground, and his companions are the ghosts and demons. Naked like a madman, sometimes laughing and sometimes crying, he smears crematorium ashes all over his body. He does not bathe regularly, and he ornaments his body with a garland of skulls and bones. Therefore only in name is he śiva, or auspicious; actually, he is the most mad and inauspicious creature. Thus he is very dear to crazy beings in the gross mode of ignorance, and he is their leader. [ SB - 4.2.14, 15 ]
Referece: Shrimad Bhagavatam, Canto 4, Chapter 2
I know the actual story that why Sati's father King Daksha hated Lord Shiva. Once Lord Brahma had started to telling bad things about nature and he can't accept the Rudra. Lord Shiva had became so much angry and he had slays the fifth head of Lord Brahma. Brahma's son Prajapati Daksha the father Shiva's wife Sati became too much angry on Shiva and after that he started to hate Shiva. And we know how Daksha started to like Shiva after Sati's death.