A Bachelor's degree is required for federal special agent positions (very few exceptions) and the maximum age is 37. Any major is acceptable, but CJ, Computer Science, Sociology, Accounting, or Psych may stand you in better stead for most positions. A Homeland Security degree would probably be on par with a CJ degree (GPA is more important). Those meeting the minimum requirements may not compare well to the best qualified applicants, and there are always more applicants than positions. The FBI likes lawyers and accountants, but they hire from various backgrounds, with at least 3 years of substantive employment ((http://www.fbijobs.gov/).
Any responsible employment may acceptable, but law enforcement may be beneficial (particularly investigative rather than patrol). Other federal agency job announcements should be available at https://my.usajobs.gov/login.aspx.
The FBI in particular needs people capable of investigating major frauds and conspiracies involving numerous business and technical occupations and professions; whereas, local police are more oriented to street crime. Federal agents must be capable of understanding and communicating at a level above that usually expected from patrol officers. Federal agencies are looking for people who fit in at all social strata, and the expectations are greater with regard to preparation of reports and affidavits. In my experience, state and local officers have their affidavits written by prosecutors; whereas, federal agents write their own.
Being a military officer will normally be advantageous, and military service usually provides veteran preference in the hiring process. However, enlisted service will not necessarily enhance one’s prospects, unless in a specialized position or exemplary service is documented. Military police assignments will not necessarily provide an advantage over infantry assignments, and the branch of service is not necessarily important. Being a practicing attorney or accountant would also place one in a good position. Forensic computer expertise language capabilities are valued in all agencies.
You are more likely to be successful if you do not restrict yourself to one agency. Moreover, agents get hired from other agencies regularly. If you have proven yourself in another agency (particularly federal), you will have an advantage for FBI hiring. Being a police officer may be helpful, depending on personal performance, assignments, and agency reputation.
I recommend that people major in psych and minor in CJ (even though I majored in CJ for a BS and PhD, with a Masters in management [sponsored by and on government time]). The academic specialization for a graduate degree is not necessarily important.
GPA (above 3.5 is a plus), testing, physical fitness, work experience, possibly a polygraph, ability to communicate orally and in writing, possibly physical test results, and graduate degrees are what determine who gets hired. And, I repeat, there are always more applicants than there are positions.
There are numerous special agent positions (see list below, not all have full arrest, search, and seizure authority), in what was and I assume still is the 1811 job series (1810 are unarmed investigators without arrest authority). There are also law enforcement related positions in the Dept of Homeland Security and other agencies, such as inspector positions or Border Patrol agents, that could be open to those with 2 years of college or less. And, there are federal police officers within federal agencies (e.g., Dept of Veterans Affairs, Treasury, Federal Protective Service). Agencies:
ATF, Customs and Border Protection (uniform wearing: Border Patrol Agent, Officers), DEA, Dept of Def, Dept of State, Dept of Homeland Sec (ICE, TSA)
Dept of Labor, EPA, FBI, FDA, Fish & Wildlife (few positions, many applicants), Inspector General Offices within departments and/or agencies, IRS, Marshals Service, State Dept, Secret Svc, Securities Exchange Commission, and each branch of the Armed Forces (some civilian, some active duty).
Apply at as many places as possible, and accept the first offer. Then, if that’s not where you want to be, keep applying to the agency you want. Having a secret clearance is a good indicator that someone will pass a background investigation, but it is not necessarily going to put one ahead of a better qualified person.