Wagner played the As The World Turn's
matriarch, Nancy Hughes, from its debut on April 2, 1956, until her death. She is acknowledged by the Guinness Book of Records for having the longest run in a single role on television. In fact, Wagner spoke the show's very first line, "good morning, dear," and would go on to witness its many broadcast transformations. As The World Turns
premiered as a 30-minute program and was the first soap opera, along with The Edge of Night
, to do so. Up until that time, all soaps ran for only 15-minutes. Advertisers were skeptical at first, finding it hard to believe that the average housewife had the attention span to tune to one soap opera for a half hour. The show would hit ratings gold within three years. After a number of years of broadcasting live and in black-and-white, it would eventually go on to air on tape and in color and expand to a full hour.
On November 22, 1963, Wagner inadvertently became part of broadcast history. About ten minutes into that day's episode of As the World Turns, a scene featuring Wagner's character was interrupted by Walter Cronkite's first news bulletin that President John F. Kennedy had been shot in Dallas, Texas (this bulletin was audio only, as the studio camera was not ready until 20 minutes later). Wagner later remembered that she and actor Santos Ortega, who played Grandpa Hughes, continued with the scene as it was broadcast live, unaware of the unfolding national tragedy until they were told about it during a commercial break. 
Wagner took some breaks from the role, both voluntary and involuntary. After six months with the show, creator Irna Phillips fired her because she did not favor the way Wagner poured coffee. After overwhelming pressure to hire her back, Phillips did so begrudgingly. Wagner would leave of her own accord in the early 1980s. Disssatified with then-producer Mary-Ellis Bunim's decision to showcase the Hughes family less, Wagner and co-star Don MacLaughlin walked away from the show after vocal dissent in the press. With As The World Turns having fallen from the top spot in the Nielsen TV ratings, Bunim wanted to shift the show's focus to the younger generation. Wagner eventually returned to the role in 1985 and in 1986 she and an ailing MacLaughlin, who played her on-screen husband, were prominently featured in the show's 30th anniversary episode. The storyline had their characters celebrating their 50th wedding anniversary.
After McLaughlin's death in 1986, the Nancy Hughes character became a widow. She later met and married Dan McClosky (Dan Frazer) and was subsequently part of a storyline in which Dan was diagnosed with Alzheimer's Disease. After it culminated in Dan's death, Wagner faced many years with little to no part in the story. She returned to the screen with a pivotal role in a 2004 storyline revolving around her grandson's marriage to naïve teenager Alison Stewart (Jessica Dunphy).
In 2005, 2006, and 2007, Wagner averaged around three appearances a month on the serial. She was prominently featured in the show's 50th anniversary episode in April 2006. Her lack of screen time was attributed by some to the failing health of her real-life husband, Robert Willey. But press reports later stated that show producer Procter & Gamble had actually taken Wagner off contract and only used her on special occasions. Insiders are reported to have said that this move hurt her deeply. Fans were vocal in their displeasure with Wagner's lack of story. When asked how long she would keep playing Nancy, Wagner replied "As long as I can and they want me." After a prolonged absence, Nancy returned to the screen on November 25, 2009 for the show's Thanksgiving episode and also on December 29, 2009. She appeared again on April 2 and April 5, 2010. Wagner's final appearance on As the World Turns, taped in March, aired on June 1, 2010 — exactly a month after her death.
Wagner's death was finally addressed in episodes broadcast on August 30 and 31, 2010. On August 30, Nancy's son Bob Hughes discovers that his mother has died quietly in her apartment. In the following episode, family and friends remember Nancy, with numerous flashbacks to scenes from vintage episodes.
Wagner's death came less than two months before As The World Turns taped its final episode. CBS announced on December 9, 2009, that it was cancelling the show after 54 years on the air. Many fans had hoped that Wagner would be able to close the series with the line "good night, dear," just as she had uttered "good morning, dear" as the first line of the program back in 1956. The last episode was taped on June 23, 2010 and aired on September 17, 2010.
Although Wagner played Nancy for more than 50 years, she never won a Daytime Emmy Award for her work. She was, however, presented with a "Lifetime Achievement" Emmy in May 2004.