Detweiler (1-0), making his first appearance as a full-time member of the Nationals' starting rotation, allowed only two hits while issuing a single walk and striking out six.
Werth finished 4-for-5 with a pair of run-scoring singles and Ian Desmond added a solo homer for Washington, which evened its three-game set with New York.
Mets starter Dillon Gee (0-1) was touched for four runs (three earned) on eight hits before exiting after 5 1/3 innings.
Ronny Cedeno went 3-for-4 with an RBI double for New York.
Millions of Getty images now available for free via embed tool
Boston schools pull out free condoms over wrapping complaints