James Cunningham Rogers, 87, a retired partner in the Washington law firm of Hogan and Hartson who specialized in taxes and corporate affairs, died Friday at the Bel Pre. Health Care Center in Silver Spring following a stroke.

Mr. Rogers, who was born in Livermore, Pa., attended the University of Pittsburgh. He moved to Washington and earned a law degree from George Washington University, in 1915.

He began his legal career as an attorney in the Office of the Solicitor of the old Bureau of Internal Revenue. Except for World War I service as a captain in the Army, he remained there until 1925. He was an assistant solicitor when he resigned from the government.

From 1925 to 1938, Mr. Rogers was a partner in the firm of Marsh & Rogers. In 1938, he joined Hogan and Hartson as a partner and remained a member of that firm until his retirement in 1970.

In the course of his career he was a director and general counsel for the Julius Garfinkel & Co. department store, general counsel to the D.C. Bankers Association and a trustee and counsel to the Washington Hospital Center.

Mr. Rogers was a member of All Souls Unitarian Church in Washington and of the Metroplitan and Capitol Hill about 1970, when he moved to Rossmor Leisure World in Silver Spring. He had been at the Bel Pre Health Care Center for about six years.

Survivors include his wife, Marion Marguerite, of Rossmoor; two daughters, Nancy Sibley Garver of Colden, N.Y., and Rebecca Elizabeth Marcus of Santa Barbara, Calif; one son, Dr. David L. Rogers of Annapolis; a sister, Rebecca P. Henderson of Washington; nine grandchildren, and two great-grandchildren.