Flagg was born in Pelham Manor, New York. He was enthusiastic about drawing from a young age, and had illustrations accepted by national magazines by the age of 12 years. By 14 he was a contributing artist for Life magazine, and the following year was on the staff of another magazine, Judge. From 1894 through 1898, he attended the Art Students League of New York. He studied fine art in London and Paris from 1898–1900, after which he returned to the United States, where he produced countless illustrations for books, magazine covers, political and humorous cartoons, advertising, and spot drawings. Among his creations was a comic strip that appeared regularly in Judge from 1903 until 1907, about a tramp character titled Nervy Nat.
In 1915 he accepted commissions from Calkins and Holden to create advertisements for Edison Photo and Adler Rochester Overcoats but only on the condition that his name would not be associated with the campaign.
He created his most famous work in 1917, a poster to encourage recruitment in the United States Army during World War I. It showed Uncle Sam pointing at the viewer (inspired by a British recruitment poster showing Lord Kitchener in a similar pose) with the caption "I Want YOU for U.S. Army". Over four million copies of the poster were printed during World War I, and it was revived for World War II. Flagg used his own face for that of Uncle Sam (adding age and the white goatee), he said later, simply to avoid the trouble of arranging for a model. President Franklin Delano Roosevelt praised his resourcefulness for using his own face as the model. By some accounts though, Flagg had a neighbor, Walter Botts, pose for the piece.
At his peak, Flagg was reported to have been the highest paid magazine illustrator in America. In 1946 Flagg published his autobiography, Roses and Buckshot. Apart from his work as an illustrator, Flagg painted portraits which reveal the influence of John Singer Sargent. Flagg's sitters included Mark Twain and Ethel Barrymore; his portrait of Jack Dempsey now hangs in the Great Hall of the National Portrait Gallery. In 1948 he appeared in a Pabst Blue Ribbon magazine ad which featured the illustrator working at an easel in his New York studio with a young lady standing at his side and a tray with an open bottle of Pabst and two filled glasses sat before them.
James Montgomery Flagg died in New York City and was interred at Woodlawn Cemetery.
Ft. Knox Kentucky has a parade field named and dedicated to James Flagg. It is called Flagg Field and located behind the Ft. Knox Hotel.
Flagg spent summers in Biddeford Pool, Maine and his home, the James Montgomery Flagg House, was added to the National Register of Historic Places in 1980.