The architect of the Carter administration's illfated welfare revision plan is leaving government as part of a reshuffle of posts in the Department of Health, Education and Welfare.

Government sources, who asked not to be identified, confirmed that Herry Aaron has decided to give up his presidential appointment as assitant secretary for planning at HEW.He reportedly will return to the Brookings Institution, Washington's liberal think tank, at least for the time being.

Aaron, an economist who has been Secretary Joseph A. Califano Jr.'s resident academic, was credited - and criticized - for the principal innovations in the welfare overhaul plan President Carter sent to Congress early in his administration. The legislation underwent major revisions in the House and Senate before congressional leaders declared it dead several weeks before Congress adjourned.

It also was learned that Califano plans to replace Aaron with the secretary's closest aide, Benjamin Heineman Jr., a young lawyer who followed Califano from his highly visible Washington law firm to the government's largest department.

Because the assistant secretaryship is a presidential appointment requiring Senate confirmation, Heineman's name still must be cleared by the White House, sources said.

They added that Heineman will be replaced by Richard I. Beattie, the department's general counsel and a key negotiator for Califano in several critical disputes involving the department.