As long as you've graduated high school, you can become a private detective at almost any age (source). However, there's a difference between securing a license and getting a job.
Many detectives start out as field investigators for agencies. Agencies usually like to employ those who have a college degree in criminal justice or political science. It helps to call local agencies in your area to find out what type of qualifications they're looking for in an applicant—and then do those things.
New private detectives who go into a specific field usually need a bachelor's degree. For instance, corporate investigators generally need a degree in business, finance, or accounting to be able to collect evidence of fraud. If you want to go into computer forensics, you better know how to do more than just turn on a computer.
Whether you're just out of varsity, the owner of a college degree or two, or you're an ex-cop, you need a private investigator's license to open up shop. To apply, you must be able to prove that you worked 6,000 hours—a whopping six months—for an agency. You then need to pass an exam pertaining to criminal law and investigative practices. You need a clean background check to get a license.
That's right, you'll have detectives investigating you before they even let you become one yourself. We guess it's like some kind of club initiation.