Niles was the butler for the Sheffield family. He had been a valet for Maxwell Sheffield for most of his life. When Sheffield came to America, Niles had come along as well. He had been with the family for many years, even when Maxwell was married to his late first wife, Sara.
It was revealed in the Season 1 Episode 9 ("The Nanny-in-Law") that Niles' father had been the butler for Maxwell Sheffield's father; and that they had therefore grown up together and known each other all their lives. This was revealed by Clara Mueller (played by Cloris Leachman), who had been Sheffield's nanny.
His surname was never revealed in the series. At one point, he claims he has only one name "...like Cher. He is portrayed as strategical, loyal, kind and protective of the Sheffield household. However he is known for his manipulative attitudes, constant whinging and sulking over minor matters. He also has an issue with compulsive gambling. In the years following Sara's death, the house was somber, and Maxwell's business partner C. C. Babcock descended like a vulture and tried to woo Maxwell into marrying her. The fact that Niles considers C.C. a necessary evil did not necessarily mean he had to like her. In fact, he outright hated her, and made it his mission to torment her at every opportunity. As he would reflect to C.C. years later, "Well, truth be told my life was a little empty. But now I have a hobby."
When Maxwell hired Fran Fine as the new nanny for the children, Niles bonded with her right away. To Niles, Fran was a breath of fresh air that brought back some life in the house, which had been lacking since Sara died. He encouraged the romantic tension between Fran and Maxwell, and helped undermine C.C.'s constant attempts to sabotoge it. Fran and Niles both delighted in holding what became known as "The Thing", (Maxwell telling Fran that he loved her and taking it back) over Maxwell's head for almost a whole season.
Even though Niles despised C.C., the mutual rage between the butler and socialite suddenly turned to lust at the apex of their hate for one another. After the premiere of a play he co-produced with Fran, Niles could no longer muster insults for C.C. like those which had come naturally in the past. Having been advised by Fran to admit his feelings to C.C., he nervously blurted out a proposal. Appalled at the thought of marrying someone below her station, C.C. flatly turned him down several times. But after becoming trapped in an elevator with Fran (who was in labor with her twins), C.C. broke down and accepted Niles' proposal through the closed doors. C.C. and Niles marry in the series finale, as Fran is giving birth to twins. After them being pronounced Man and Wife, C.C. learns that she is pregnant with Niles' baby, which causes both of them to faint.
As the all-seeing butler, Niles was known for manipulating events to ensure that Maxwell wasn't shortchanging Fran or others. He was also known for "overhearing" things that weren't really meant for him to hear. He owns a leopard thong-bikini. He gained a friendship with Sylvia Fine, Fran's mother, and always made sure something for her to eat was available.