Nikolas Cruz, 19, said he arrived on campus and began shooting students before abandoning his weapon and escaping, according to a court document.
He has appeared in court charged with 17 counts of premeditated murder.
The FBI has admitted it received a tip-off about him last year.