If you dream of hugging someone, it indicates your love and connection with that person. It shows that you want to bond with them and offer your support. A brief hug with a deceased person can symbolize longevity. Through the act of hugging in your dream, you express the depth of your relationship and feelings, reflecting your emotional state.
From Imam Muhammad Ibn Seerin's Dictionary of Dreams According to Islamic Inner Traditions â entry "Hug" (page 216).
To embrace a living person in a dream means to associate with him and to love him. To give a deceased persona short hug in a dream means longevity. To give a deceased person a long and a continuous embrace in a dream means one's own death. To embrace a woman in a dream means embracing the pleasures and attractions of this world and to despair of any reward in the hereafter. To hold tight to a piece offruit, or to endear certain food one loves in a dream means easy profits or lawful earnings. If an unmarried person holds tight or embraces a garment in a dream, it means that he will get married. If one hugs a pair of shoes in a dream, it means that he will hold a new position or a job that will make him extremely happy. (Also see Embrace; Grabbing; Gripping; Sexual intercourse)
Note: Islamic dream interpretation depends on the dreamer's circumstances and state. This is a general guide drawn directly from the source book.