Given the ad hoc crisis-driven environment in which the Department of Homeland Security was created, I am not certain that you can list four major agencies that were folded into it, as a large number of agencies were moved from other departments into DHS and new agencies were created within the new department. Having said that, I would list the following in response to your question.
The four main federal agencies that were merged into the newly established Department of Homeland Security are:
1) The United States Secret Service
2) The Immigration and Naturalization Service, subsequently separated into two separate agencies within DHS: Immigration and Customs Enforcement and Citizenship and Immigration Services.
3) The United States Coast Guard
4) Federal Emergency Management Agency.
The Transporation Security Administration was originally part of the Department of Transportation; the National Infrastructure Protection Center was transfered from the FBI to DHS; the National Communications System was transfered from the Department of Defense to DHS, and so on. Border control functions previously allocated among several agencies were merged into U.S. Customs and Border Protection, also within DHS. Similarly, agencies spread across the federal government responsible for responding to chemical, biological or nuclear weapons attacks against the United States were merged into a single agency within DHS.