Donald P. Hertzog, 54, general tax counsel of Texaco Inc. and a former trial attorney and special assistant for the Justice Department, died of a heart attack Saturday in Pelham, N.Y.

A resident of Pelham, Mr. Hertzog was stricken while playing paddle ball at a local country club.

Born and reared in Washington, he graduated from Gonzaga High School and Georgetown University. He earned a law degree from Georgetown University's law school in 1951 and a master of laws degree from New York University's graduate law school in 1963.

Mr. Hertzog was a special attorney for the Bureau of Internal Revenue, now the Internal Revenue Service, for two years before becoming a trial attorney for the Justice Department in 1952. He then served as special assistant to the attorney general in the tax division at Justice until 1957.

He joined Texaco that same year as a tax attorney and was elected general tax counsel in charge of the tax department in 1976.

Survivors include his wife, the former Jeanne O'Malley, and three children, John, Mary and Matthew, all of Pelham; his father, Rudolph P., a former chief tax counsel of the IRS, of Chevy Chase, and two sisters, Rita (Mrs. Charles L.) Schultze of Washington, and Helen (Mrs. James) Linehard of Chevy Chase.

The family suggests that expressions of sympathy be in the form of contributions to the Donald P. Hertzog Memorial Fund at Our Lady of Perpetual Help Catholic Church in Pelham, N.Y.