Dorothy McCoy Heffernan, 59, a secretary in the federal government for 25 years and a native Washingtonian, died of cancer Wednesday at her home in Silver Spring.

Mrs. Heffernan graduated from Woodrow Wilson High School in Washington and then attended the Strayer Business College. She began her career with the federal government in 1939.

She was a secretary at the Department of the Treasury, the United Nations Relief and Rehabilitation Agency and the Department of the Navy. In the late 1940s, she joined the Public Health Service. At the time of her retirement in 1973, she was a secretary at the National Institutes of Health.

In 1951, she married James L. Heffernan. She took several years off from her government work to raise her family.

Mrs. Heffernan was a member of the National Trust for Historical Preservation and of the National Capital Plate Club. She also was interested in the care and protection of animals.

In addition to her husband, of the home, survivors include a son, Stephen A., also of Silver Spring, and a sister, Jennie Lee Green, of Rockville.

The family suggests that expressions of sympathy be in the form of contributions to the Society for the Prevention of Cruelty to Animals.