Cambridge Police report both victims are expected to survive injuries to the lower parts of their bodies.
Michael Coleman, 23, of Dorchester was arrested and charged with the shootings, police say, adding they recovered a gun.
Police then shut the carnival, about 90 minutes early.
MIT urged people nearby to shelter indoors.
About a half hour later, police responded to a report of gunfire on River Street near William Street in Central Square. They found a house on William Street hit by gunfire, but no injured people. Officers recovered a gun, police say.