The Controller was the name given to the ancient underground computer control system built on Sigma Draconis VI. It maintained the underground home of the Eymorgs (Draconis' female inhabitants). The system incorporated a living brain. In 2268, after ten thousand years of service, the Controller's brain began to fail. The Eymorg Kara, at that time the leader of her people, used the Great Teacher to reacquire the knowledge of the builders. Setting forth in a small ship, she intercepted the USS Enterprise. There, she surgically extracted Spock's brain from his body (in an operation Dr. McCoy described as "technically brilliant") and absconded with it back to Sigma Draconis VI, where she used it to replace the failing brain. When eventually confronted, she claimed the new Controller would last for ten thousand more years, suggesting that the equipment vastly slowed aging (ten thousand years is roughly fifty times a Vulcan's normal lifespan).
While connected to the equipment, Spock remarked that his medulla oblongata was hard at work breathing, pumping blood, and performing other functions normally associated with the autonomic nervous system. This led him to speculate that the Controller functioned as the brain of the underground complex, maintaining the ventilation, heat, light, and other life support functions. He commented that this was only part of his task but did not say what other responsibilities he had. According to Kara, the Eymorgs would die without the Controller, meaning that the underground complex could not operate and the Eymorgs would be forced to vacate it.
Using the knowledge of the Great Teacher, Dr. McCoy restored Spock's brain to his body. According to Captain Kirk, the Federation would send advisers to teach the Eymorgs how to live on the surface with the Morgs (Draconis' male population who lived on the surface), effectively ending the male/female schism. (TOS: "Spock's Brain")