In 1998, Joe Quirk, a Bay Area novelist, wrote “Ultimate Rush,” a thriller about an adrenaline-fueled messenger who tears through the city on rollerblades as he tries to deliver a mysterious package. Mr. Quirk’s novel, his first to be published, sold well and was optioned by Warner Brothers. A screenplay was commissioned, and Mr. Quirk became a client of the powerful C.A.A. agency. But nothing ever came of it — or so Mr. Quirk thought.

Last summer, the literary agent Rob Weisbach, who had published “Ultimate Rush” while running his own imprint at William Morrow, found a street near his Manhattan home closed for filming of “Premium Rush,” a big-budget Sony Pictures thriller about an adrenaline-fueled bike messenger who tears through the city as he tries deliver a mysterious package. Mr. Weisbach sent Mr. Quirk hearty congratulations.

Mr. Quirk had no idea what his onetime publisher was talking about. The writer, now 45, was working minimum-wage jobs found on Craigslist, struggling to refinance his Oakland home.

Everyone loves a good heist story, and that is what Mr. Quirk says he uncovered as he spent the last year figuring out how, in his view, the characters and plot of his “Ultimate Rush” came to be in Sony’s “Premium Rush.” He filed a lawsuit earlier this month — but had to talk to almost 50 lawyers before he could find one willing to take the case.