I'm currently on a H1B visa with a company. Due to family reasons I intend on going back to my home country and spend some time with family, which means I'll have to quit work. Is it possible to come back to the US, assuming I'm able to secure a job with a company? And will this have to be done before the expiration date of the H1B document?
Without knowing all the facts, no; another U.S. company could sponsor you for an H-1B after your current H-1B expires without having to put your name through the H-1B lottery again.