The Secretary of War was a member of the United States President's Cabinet. The position, as well as the department the position holder oversaw--the Department of War--lasted as an executive position from 1789 to 1947.
The position of Secretary of War--also known as the Secretary at War--was established to serve the Confederation Congress under the Articles of Confederation between 1781 and 1789.
Upon his inauguration in 1789, George Washington, the first president under the U.S. Constitution, determined the Secretary of War would be an ongoing position, responsible for the country's military affairs.
Secretary of the Navy
In 1798, the Secretary of the Navy position was introduced, thus relegating the Secretary of War exclusively to Army concerns.
In 1947, the Secretary of War ceased to exist when it was replaced by the Secretary of the Army and the Secretary of the Air Force. These positions, combined with the Secretary of the Navy, became part of the newly formed Department of Defense, overseen by the Secretary of Defense.
Secretary of Defense
Today, the Secretary of Defense acts as the principal defense policy formulator and adviser to the U.S. president, and oversees the country's armed services and military matters.