It is a little known fact that the Department of Education was first established in 1867. Rep. James A. Garfield (R-OH) sponsored the legislation. The legislation authorized a mere three employees and its duties were few but not insignificant. President Andrew Johnson signed it.
But he also signed an appropriation bill the next year (1868) that demoted the DOE to the Office of Education and tucked it in the Department of the Interior. The first commissioner was Henry Barnard. The DOE did not have a secretary like the other departments—it had a commissioner. And that did not change until President Jimmy Carter signed a 1979 law to elevate the agency to a full cabinet department with a secretary.