James Cavanagh (c. 1831 – 7 January 1901) was an Irish-American soldier. He was the first general officer in the New York Guard.
Cavanagh was born in County Tipperary, Ireland and emigrated to New York when he was sixteen years old and went to work as a carpenter. In 1852 he enlisted as a private in the Sixty-Ninth Regiment of the Militia, and was captain of Company C of the state command when it went to take part in the American Civil War, April 23, 1861.
When the regiment returned after the First Battle of Bull Run and was reorganized as the Sixty-Ninth New York Volunteers of the Irish Brigade, he again went to the front as its major. In this rank he served during the campaigns of the Army of the Potomac, until the battle of Fredericksburg, 13 December 1862, when he was shot in the hip while leading the regiment in one of the charges up Marye's Heights. He was then discharged from the army because of the disabilities from his wound.
When the State Militia was reorganized as the National Guard, he rejoined the regiment and was made its lieutenant-colonel. In 1867 he was elected colonel, which command he held for more than twenty years. He received the brevet of brigadier-general, 10 January 1893, the first time that rank was conferred on an officer of the New York State Militia, and in 1894 he retired, after a service of forty-two years. For a number of years before his death he was attached to the New York Custom House as a special customs inspector.