The youth, who has not yet been named and is 15, was arrested at a house near Albuquerque and faces murder and other charges in connection with the shootings on Saturday night, a Bernalillo County sheriff's spokesman said.
The victims' identities have not been released, and the boy's motive and connection to the five victims were not immediately known.
One of the weapons used was a semi-automatic military-style rifle.
The shooting came after pro-gun activists staged "high noon" rallies on Saturday to defend the right to own firearms that they say is being threatened by President Barack Obama's gun-control proposals. He has pledged a raft of measures to tighten gun laws following the mass shooting at a school in Newtown, Connecticut, in mid-December that killed 20 children and six adults.
On the day the pro-gun rights rallies were being held, five people were wounded in accidents at three gun shows.
Three people were hurt when a 12-gauge shotgun discharged as its owner opened its case at the entrance to a show in North Carolina. Two others were wounded when guns went off accidentally at gun shows in Ohio and Indiana.