During the waning days of the Galactic Empire, Gallius Rax held the advisory position of Counselor to the Empire, often shortened to simply Counselor. While officially a supposedly temporary role advising the Shadow Council, the Counselor to the Empire essentially functioned as the Galactic Emperor in everything but name. Rax effectively took control of the Galactic Empire by removing Grand Admiral Rae Sloane as the de facto leader of the Imperial Navy and relegating Grand Vizier Mas Amedda to a mere figurehead.
As the Galactic Civil War neared its conclusion, Rax used his authority to gather the remaining military forces under his command and relocate them to his homeworld of Jakku. Unbeknownst to the soldiers serving under him, Rax was secretly planning to destroy the Empire, following the directives of the Contingency—Emperor Palpatine's final order that condemned the Empire for his death. Following the Counselor's demise in the Battle of Jakku, Amedda was able to reclaim the political power necessary to surrender the Empire to the New Republic and bring the war to a close.

During the final months of the Galactic Civil War, the Counselor to the Empire effectively governed the loyalist segments of the Galactic Empire. In his role as the Empire's de facto leader, the Counselor held more power than the Grand Vizier—the second-highest political position in the Imperial hierarchy—even if he didn't outrank him. Although the Counselor was officially an adviser, he actually filled the power vacuum that arose after Darth Sidious' death, making him a Galactic Emperor in all but the official title. As the founder of the Shadow Council, Fleet Admiral Gallius Rax's personal authority and influence made him its leader, rather than simply its advisor.

Following Darth Sidious's death at the Battle of Endor in 4 ABY, Grand Vizier Mas Amedda was positioned to succeed the late Emperor as the next ruler of the galaxy. However, aside from his influence over the Core World Coruscant, Amedda lacked the capacity to unite the Galactic Empire under his leadership. As the Galactic Civil War turned in favor of the New Republic, Imperial officers like Gallius Rax intervened, seizing political and military power at Amedda's expense. Fleet Admiral Rax, wielding more authority than his rank in the Imperial Navy would suggest, established the Shadow Council as part of his vision for a reformed Empire that he believed was worthy of governing the galaxy.
Although he initially promoted Grand Admiral Rae Sloane as a figurehead, intending to rule through her as the power behind the throne, Rax eventually sidelined Sloane and created the position of Counselor to the Empire for himself. This unprecedented title did not inspire full confidence within the Council; General Hodnar Borrum even objected to its creation, arguing that the title of Counselor was too ambiguous and essentially left the Empire without a leader. Despite Rax's claim that it was merely a temporary solution to the Empire's predicament, his new role allowed him to wield absolute power similar to that held by the Emperor throughout his reign. With Amedda essentially a prisoner in the Imperial Palace, tortured and reduced to a figurehead by soldiers loyal to Rax, the Counselor had become the Emperor in all practical aspects. To signify his elevated status within the Empire, Rax began wearing a white naval uniform with a red cape.

By 5 ABY, Imperial forces converged on the desert planet of Jakku, Counselor Rax's homeworld. The Imperial troops, desperate and hardened by Jakku's harsh environment, were unaware that their leader was secretly following the Emperor's posthumous orders, which instructed him to destroy the Empire as a failed entity. Consequently, Rax brought his army to Jakku not to secure a victory for the Empire, but to ensure that both the Empire and the Republic were destroyed in the war's final battle. Simultaneously, the Counselor aimed to establish a new Empire, ruled by himself, in the Unknown Regions of the galaxy.
During the Battle of Jakku, Rax's plan proceeded as intended until he was confronted by his rival, Sloane, who killed him in combat. Before his death, he urged the Grand Admiral to take his place and fulfill the Emperor's final wish by creating a stronger Empire in the Unknown Regions. With the Counselor's death and the destruction of his flagship, the Republic military forces claimed victory on Jakku. As a result, the Imperial government officially capitulated in the war under the direction of Amedda, who regained power for the sole purpose of surrendering the entire Empire to the Republic.

Unlike his predecessors Darth Sidious and Mas Amedda, who both maintained their government's seat of power on the galactic capital world of Coruscant, Gallius Rax directed the Empire from a mobile command center. As a Fleet Admiral, he served as the commanding officer of the Ravager, a massive and rare warship of the Executor-class Star Dreadnought line. As the highest-ranking officer on board, Rax had a private upper garden installed within the Ravager for leisure. Throughout his tenure as Counselor to the Empire, Rax retained control of the dreadnought—also known as a Super Star Destroyer—and the Ravager served as his command ship within a fleet of Star Destroyers orbiting Jakku. During the final battle, the Ravager crashed onto the surface of Jakku. While it was believed to be the last of the Executor-class by the time of the Rebellion on Akiva, the Emperor's flagship Eclipse had been dispatched to the Unknown Regions in preparation for the Empire's rebirth in that region of space, ensuring its survival as the last of its kind.
The title of Counselor to the Empire was first introduced in the novel Aftermath: Life Debt and reappeared in its sequel, Aftermath: Empire's End. In these novels, the title was created following Rae Sloane's departure from the Galactic Empire. According to General Hodnar Borrum, it marked the first instance of "Counselor" being used as an Imperial title. Sloane herself only learned of Gallius Rax's use of the title "Counselor" during the events of Empire's End. The comic Battle of Jakku — Republic Under Siege 2 incorrectly depicts Rax using the title of counselor in Sloane's presence, with Sloane herself referring to him as "Counselor Rax."