Keys made her film debut in early 2007 in the crime film Smokin' Aces, co-starring as an assassin named Georgia Sykes opposite Ben Affleck and Andy García. Keys received much praise from her co-stars in the film; Ryan Reynolds called her "so natural" and said she would "blow everybody away." Smokin' Aces was a moderate hit at the box office, earning $57,103,895 worldwide during its theatrical run. In the same year, Keys earned further praise for her second film, The Nanny Diaries, based on the 2002 novel of the same name, where she co-starred alongside Scarlett Johansson and Chris Evans. The Nanny Diaries had a hit moderate performance at the box office, earning only $44,638,886 worldwide during its theatrical run. She also guest starred as herself in the "One Man Is an Island" episode of the drama series Cane.
Keys released her third studio album, As I Am, in November 2007; it debuted at number one on the Billboard 200, selling 742,000 copies in its first week. It gained Keys her largest first week sales of her career and became her fourth consecutive number one album, tying her with Britney Spears for the most consecutive number-one debuts on the Billboard 200 by a female artist. The week became the second-largest sales week of 2007 and the largest sales week for a female solo artist since singer Norah Jones' album Feels like Home in 2004. The album has sold three million copies in the United States and has been certified three times Platinum by the RIAA. It has sold five million copies worldwide. Keys received five nominations for As I Am at the 2008 American Music Award and ultimately won two. The album's lead single, "No One", peaked at number one on the Billboard Hot 100 for five consecutive weeks and Hot R&B/Hip-Hop Songs for ten consecutive weeks, became her first number-one single on the Hot 100 since 2004's "My Boo" and becoming Keys' third and fifth number-one single on each chart, respectively. The album's second single, "Like You'll Never See Me Again", was released in late 2007 and peaked at number 12 on the Billboard Hot 100 and number one on the Hot R&B/Hip-Hop Songs for seven consecutive weeks. From October 27, 2007, when "No One" reached No. 1, through February 16, 2008, the last week "Like You'll Never See Me Again" was at No. 1, the Keys was on top of the chart for 17 weeks, more consecutive weeks than any other artist on the Hot R&B/Hip/Hop Songs chart. The album's third single, "Teenage Love Affair", which peaked at number 54 on the Billboard Hot 100 and number three on the Hot R&B/Hip-Hop Songs. The album's fourth and final single, "Superwoman", which peaked at number 82 on the Billboard Hot 100 and number 12 on the Hot R&B/Hip-Hop Songs.
Keys' lyrical content has included themes of love, heartbreak, female empowerment, hope, her philosophy of life and struggles, inner city life experiences, and social and political commentary. John Pareles of The New York Times noted that Keys presents herself as a musician first, and lyrically, her songs "plunge into the unsettled domain of female identity in the hip-hop era, determined to work their way through conflicting imperatives", while she plays multiple roles in her songs, expressing loyalty, jealousy, rejection, sadness, desire, fear, uncertainty, and tenacity. Pareles considered in 2007 that Keys did not "offer private details in her songs" and that her musical compositions make up for a lack of lyrical refinement. Gregory Stephen Tate of The Village Voice compared Keys' writing and production to 1970s music. NPR described a few foundational elements in Key's music: "heartache or infatuation", a "tenderness and emotion made heavy with wisdom", a "patiently unfurling melody", and her "yearning" voice. In 2016, referencing her sixth album, Here, Salon noted a "hypnotic tension" in Keys' lyrical expression and complimented her "sense of rhythmic timing" and socio-political consciousness.
She participated in the Nobel Peace Prize Concert which took place at the Oslo Spektrum in Oslo, Norway, on December 11, 2007, along with other artists. She recorded a theme song for Democratic presidential nominee Barack Obama. She joined Joss Stone and Jay-Z on the effort, which served as a theme song for Obama's campaign. Keys performed the song "Prelude to a Kiss", retitled "Send Me an Angel", from her 2007 album As I Am for the "Hope for Haiti Now: A Global Benefit for Earthquake Relief" telethon in response to the 2010 Haiti earthquake.