Robert E. James, 68, a foreign aid official for more than 20 years, died Wednesday at his home in Falls Church following a heart attack.

Mr. James was chief of the Agency for International Development's bulk cargo branch and was responsible for overseeing the chartering of ships carrying foreign aid cargos. He had served with AID since its inception in 1961, and before that with its predecessor, the International Cooperation Administration, since 1954.

In 1974, Mr. James received AID's Superior Honor Award for distinguished service in overseeing the shipping of food cargoes to drought victims in the Sahel countries in West Africa.

Mr. James served with the War Shipping Administration in Washington and Italy from 1942 through 1947. He then served as division chief in the Maritime Administration.

Mr. James was born in Brooklyn, N.Y., and graduated from Rollins College in Winter Park, Fla. Before World War II, he had been a shipping and insurance broker in New York City.

Survivors include his wife, Elizabeth O'Flynn James, of the home; three daughters, Deborah J., of the home, Barbara A., of Richmond, and Adrienne J. White, of San Clemente, Calif.; a son, Robert E. Jr., of Coshocton, Ohio, and five grandchildren.

The family suggests that expressions of sympathy be in the form of contributions to the Heart Association.