WEST HOLLYWOOD, Calif. — Tika Sumpter knew the screenplay was something special. It was, at its core, a romance, with two charming leads slowly falling for each other over the course of a single Chicago day. They speak passionately — at some points, angrily — about moral courage and racial politics and the struggles of staying true to oneself. They take sides on “Good Times” versus “The Brady Bunch,” ice cream versus pie. They quote the poet Gwendolyn Brooks (“We Real Cool”) from memory, while sizing up Ernie Barnes’s painting “Sugar Shack.” They watch “Do the Right Thing.”

It didn’t hurt that the two characters were Barack Obama and Michelle Robinson, in a fictionalized account of their first date, in 1989, when Spike Lee’s film was in theaters and Janet Jackson’s “Miss You Much” was in the air.

“I loved that it was an origin story about the two most famous people in the world right now, and about how they fell in love,” Ms. Sumpter said. “You don’t see a lot of black leads in love stories, and you definitely don’t see a lot of walk and talks with black people.”

In “Southside With You,” which opens Aug. 26, Ms. Sumpter plays the first lady-to-be at 25, a corporate lawyer who is also an adviser to a young man named Barack Obama (Parker Sawyers), an up-and-coming, Harvard-educated summer associate. The film received rave reviews when it had its premiere at Sundance, where it was one of the festival’s breakouts, in large part because of Ms. Sumpter’s performance. But “Southside With You” may not have been made if Ms. Sumpter hadn’t also pitched in as one of three producers.