Kathleen Kelly (Meg Ryan) is involved with Frank Navasky (Greg Kinnear), a leftist postmodernist newspaper writer for the New York Observer who's always in search of an opportunity to root for the underdog. While Frank is devoted to his typewriter, Kathleen prefers her laptop and logging into her AOL e-mail account. There, using the screen name 'Shopgirl', she reads an e-mail from "NY152", the screen name of Joe Fox (Tom Hanks). In her reading of the e-mail, she reveals the boundaries of the online relationship; no specifics, including no names, career or class information, or family connections. Joe belongs to the Fox family which runs Fox Books — a chain of "mega" bookstores similar to Borders or Barnes & Noble. Kathleen, on the other hand, runs the independent bookstore The Shop Around The Corner that her mother ran before her. The two then pass each other on their respective ways to work, where it is revealed that they frequent the same neighborhoods in upper west Manhattan. Joe arrives at work, overseeing the opening of a new Fox Books in New York with the help of his friend, branch manager Kevin (Dave Chappelle). Meanwhile, Kathleen and her three store assistants, George (Steve Zahn), Birdie (Jean Stapleton), and Christina (Heather Burns) open up shop for the day.
Following a day on the town with his eleven-year-old aunt Annabel (Hallee Hirsh) and four-year-old half brother Matthew (Jeffrey Scaperrotta) (the children of his frequently divorced grandfather and father, respectively), Joe enters Kathleen's store to let his younger relatives experience storytime. Joe and Kathleen have a friendly conversation that reveals Kathleen's fears about the Fox Books store opening around the corner, shocking Joe. He introduces himself as "Joe. Just call me Joe," omitting his last name, and makes an abrupt exit with the children. However, at a publishing party later in the week, Joe and Kathleen meet again, both of them being in the New York book business, where Kathleen discovers Joe's true identity.
Following suggestions from Frank/Joe via "NY152" Kathleen begins a media war, including both a boycott of Fox Books and an interview on the local news. All the while, "NY152" and "Shopgirl" continue their courtship, to the point where "NY152" asks "Shopgirl" to meet. Too embarrassed to go alone, Joe brings Kevin along for moral support. He insists that "Shopgirl" may be the love of his life. Meanwhile Kevin, looking in a cafe window at the behest of Joe, discovers the true identity of "Shopgirl." When Joe discovers that it is actually Kathleen behind the name, he confronts her as Joe (concealing his "NY152" alter ego – and feelings). The two exchange some bitter words and Joe leaves the cafe hurt, leaving Kathleen initially remorseful. Kathleen later returns home puzzled why NY152 might have stood her up.
Despite all efforts, The Shop Around the Corner slowly goes under. In a somber moment Kathleen enters Fox Books to discover the true nature of the store is one of friendliness and relaxation, yet without the same dedication to children's books as her independent shop. Eventually, her employees move on to other jobs; as Christina goes job hunting, George gets a job at the children's department at a Fox Books store (Joe later compares George's knowledge of the contents of the department to a PhD) and Birdie, who is already wealthy from investments, retires.
Allowing time for their electronic relationship to convalesce, Joe visits Kathleen while she is sick, and for the first time makes a favorable impression. Joe discovers that Kathleen has broken up with Frank, who is starting a relationship with Sydney Ann (Jane Adams), a talk show host who interviewed him. This predated one week by Joe and his uptight girlfriend, Patricia (Parker Posey), who broke up in their apartment building while stuck in the elevator. Kathleen and Joe develop a tentative friendship that blossoms over the course of a few weeks and they begin to spend more time with one another.
During this time, Joe as "NY152" mysteriously postpones meeting Kathleen. Finally, "NY152" and "Shopgirl" agree to meet for the first time since "NY152" apparently stood her up. Joe and his dog Brinkley (the topic of numerous e-mails) meet Kathleen at Riverside Park. Kathleen admits that she had wanted "NY152" to be Joe so badly, and the two kiss.