The formation of the eggshell membrane occurs in the uterus. The uterus is the muscular organ where the fertilized egg implants and grows into a developing fetus. During the process of egg formation, the eggshell membrane is formed around the egg to protect it and provide a structure for the egg to develop within. This membrane is formed within the uterus and is a crucial component in the formation and development of the egg.