The alleged assault took place in October in a forested area in the city of Uppsala, north of Stockholm.
Prosecutor Johan Stromback told The Associated Press that the five suspects are 16 and 17 years old, while the boy they allegedly assaulted is under 15. Stromback said all arrived in Sweden as unaccompanied minors seeking asylum.
The accused were charged with aggravated rape of a minor, a crime in Sweden that is punishable by at least four years in prison for adults and juvenile detention for minors, he said. The indictment calls for all five to be expelled from Sweden and barred from returning after serving any sentences.
The indictment says two suspects have acknowledged some allegations, but none has confessed to a criminal act. Stefan Wallin, a defense lawyer representing one youth, said his client neither admits nor denies the charges.
Defense lawyers for the others didn't immediately return requests for comment.