The Civil Air Patrol was created on 1 December 1941 by Administrative Order 9, issued by Fiorello H. LaGuardia (Director of the Office of Civilian Defense).

Civil Air Patrol's first National Commander - Major General John F. Curry       
Major General John F. Curry
World War II Effort
The Civil Air Patrol was created six days before the Japanese attack on Pearl Harbor, Hawii.  At the time, CAP was seen as a way to get civilian aviators involved in the war effort.
CAP assumed several home defense missions during the war, the most famous of which was Coastal Patrols.  After Pearl Harbor, the United States declared war on the Empire of Japan.  This declaration brought declarations from both Italy and Germany on the United States.  After these declarations, German U-boats began attacking ships off the shores of the United States.  Due to the unprecedented attacks on U.S. vessels, the United States War Department allowed CAP to carry ordinance to combat enemy submarines.  Some smaller CAP aircraft were fitted with 100 pound boms while larger aircraft were fitted with 300 pound depth charges. 
Due to the Civil Air Patrol's involvement during the war effort, CAP was responsible for spotting 173 enemy U-boats, 57 of which were attacked by CAP aircraft with two confirmed U-boats sunk.  In additon, the Coastal Patrol flew 86,865 missions, logging over 244,600 hours.  CAP aircraft reported 91 ships in distress and played a key role in rescuing 363 survivors of U-boat attacks.  117 floating mines were reported and 5,684 convoy missions were flown for the Navy. 
 Artistic Renditon of the Coastal Patrol
On 1 July 1946, Public Law 79-476 was enacted and stated CAPs purpose to be "solely of a benevolent character". 

For more information on Civil Air Patrol history, please visit the following wikipedia link.