Once you have a high enough relationship with the genie, when he is not in the lamp you click on him and select the option "Free the Genie". Then you will have to do a series of steps to actually free the genie. If i remember the order correctly, first is putting the lamp in the freezer, then putting it in the oven, and then going into the catacombs at the graveyard.