Three Great Emperor-Officials

The Three Great Emperor-Officials, Sanguan, or the Three Officials  are three of the highest shen in some branches of religious Taoism, and subordinate only to the Jade Emperor (玉帝 yùdì). The Three Great Emperor-Officials are the Heavenly Official (天官 tiānguān), the Earthly Official (地官 dìguān) and the Water Official (水官 shuǐguān). They administer all phenomena in the three spheres, and were thought to be able to take away sin.

Chinese playwrights popularized the worship of these gods by including a skit before plays with shared themes between each performance called The Official of Heaven Brings Happiness. 

They have been worshipped since the second century CE. 

Full titles

 * The Heavenly Official, full title: the Heavenly Official of Higher Origin and First-Rank Who Bestows Blessings (上元一品賜福天官, shàngyuán yīpǐn cìfú tiānguān), also known as the Great Emperor of Middle Heaven North Star (紫微大帝, zǐwēi dàdì).
 * The Earthly Official, full title: the Earthly Official of Middle Origin and Second-Rank Who Absolve Sins (中元二品赦罪地官, zhōngyuán èrpǐn shèzuì dìguān), also known as the Great Emperor of Pristine Emptiness (清虛大帝, qīnɡxū dàdì).
 * The Water Official, full title: the Water Official of Lower Origin and Third-Rank Who Eliminate Misfortunes (下元三品解厄水官, xiàyuán sānpǐn jiě è shuǐguān), also known as the Great Emperor of Pervasive Yin (洞陰大帝, dòngyīn dàdì)

Tiānguān
Tiānguān was thought to have power over Tiān or heaven and grant happiness to believers. 

Dìguān
Dìguān was the official of earth who took away sin in popular belief,  although all the Sanguan were thought to be able to pardon sin to some extent, especially with their powers combined. 

Shuǐguān
Shuǐguān was the ruler of the ocean in some Taoist belief systems,  and in others, he shared the same position as the Dragon King or did not exist. He was often held to "avert misfortune".