Police said about 300 to 400 students were estimated to have taken part in the protest. Aerial footage showed students pouring into the streets outside the school at 3422 Northwest 187th Street in Miami Gardens around 12:30 p.m.
Students told NBC 6 that Martin attended the school for two years, but that could not be confirmed immediately with the school board. They also added that it was a Facebook-driven march and teachers let them leave.
The students chanted "What do we want? Justice. When do we want it? Now." Some carried ice tea and Skittles, which was what Martin had gone to buy at a nearby convenience store when the shooting occurred.
"It's a bunch of kids, walking around screaming justice for Trayvon cause that's what we need. We are going to get it. If we don't get no justice there ain't going to be no peace," Alysa Robinson, a 10th grader, said.
Miami Gardens Police spokesman Carlton Coleman said the school's principal approved the demonstration, which started on campus. School officials said the children weren't given permission to leave the school.
"We want justice," said Linda Kelley, an 11th grader.
The protest brought traffic on nearby streets to a standstill as students marched for several blocks, chanting and pounding on car hoods.
Miami Gardens Police cars were at the scene along with Miami-Dade School Board police.
"We are just there as a presence," Coleman said.
By around 1 p.m. many of the students began making their way back towards the school. Some gathered at a nearby recreation center.
Officials at the school didn't immediately comment. Miami-Dade Public Schools spokesman John Schuster said Martin's mother, Sybrina Fulton, had called the school's principal and told him to tell the kids not to do this sort of thing.
Martin, 17, was shot and killed by neighborhood watch volunteer George Zimmerman on Feb. 26 in Sanford.
Zimmerman told police the shooting was self-defense, and no charges have been filed in the case.
Just hours before Rev. Al Sharpton was to hold a rally in Sanford Thursday, the city's police chief, Bill Lee Jr., temporarily removed himself from the position because he said he had become a distraction to the investigation into the shooting.
"The temporary step-down of Bill Lee is nothing," said Tracy Martin, the teen's father. He was with Sharpton when he said he wants the man who shot his son to be arrested and convicted.
Sharpton is the host of "Politics Nation" on MSNBC, which is also owned by NBC Universal.
Thursday night's rally was just one of many being held across the country over the past week following the shooting of Martin
In Liberty City Wednesday night, dozens of people marched at Sherdavia Jenkins Peace Park in support of the Martin family.
Martin's parents were in New York's Union Square Wednesday night for a rally dubbed the Million Hoodie March. Martin was wearing a hoodie at the time of the shooting.
During a Wednesday evening meeting, the Sanford City Commission voted 3-2 that it had no confidence in Chief Lee over his handling of the Martin shooting.
On Thursday, Gov. Rick Scott appointed a new prosecutor to the case. The Seminole County state attorney has said a grand jury would be investigating the case, as are state and federal authorities.