A middle-school reunion that drew hundreds to a Queens home after the invite went viral on Facebook ended early yesterday with a young man dead and five other people wounded, cops and witnesses said.

Airport baggage handler Dane Freeman, 20, was fatally shot in the head just after 2 a.m. amid a crush of people outside the home on 145th Drive in Springfield Gardens.

“Everything was going smooth, and then someone came out of nowhere, and, ‘Boom! Boom!’ ” said partygoer George Sampson, 17. “That’s when everybody started running.

“I saw [Freeman] collapse. He was looking at me, and I looked away. When I turned back, his eyes were closed.”

Three men and two women, each 21 to 25 years old, were also shot and were recuperating last night at area hospitals.

Witnesses said the bullets started flying after about eight motorcyclists tore down the street doing wheelies and spinning out.

But it was unclear whether the bikers were involved in the shooting or even attended the party.

Sources said Freeman had been arrested nearly 10 times, but his brother, Bryan, 17, called him “a good guy” who “was always looking out for me and protecting me.”

Partygoers said there were still about 200 people at the annual bash for IS 238 grads when the shooting began. The soirée has swelled in recent years to include anyone linked to the organizers’ Facebook and Twitter networks. With the invite touting a deejay and free food and booze, 318 Facebook friends had said they would attend.

The shootings left neighbors outraged.

“[They] were told they were going to have a little party,” said city Councilman James Sanders, who represents the area.

“This is not what they signed up for.

“It’s a cautionary tale: Once it goes on Facebook, it’s in the universe; there’s no way you can control it.”