The school is Robbinsdale Cooper High School, ABC News reports.
McCain and Kastigar are both dead now.
McCain met his end over the weekend amid intense fighting in Aleppo, Syria.
Kastigar died in 2009 fighting in Somalia with al-Shabab, a jihadist, al-Qaida-linked outfit.
After high school, both Kastigar and McCain shared the same address for a short time and were very good friends, according to ABC.
McCain, 33, converted to Islam in 2004. He was also an aspiring rapper. He worked at a Somali restaurant in San Diego called African Spice before heading off to Syria (by way of Turkey) to join the Islamic State of Iraq and Syria (ISIS), an extremist group also linked to al-Qaida.
Fellow students at Cooper High remember a fun-loving guy.
“He was a goofball in high school,” an unidentified classmate said, according to the International Business Times. “Doug was a fun guy to be around. Played basketball, joked a lot, had a small sense of humor. Got along with most. … Wasn’t the best athlete, but liked to play.”
Kastigar was 28 years old when he died in 2009. Before he left for Somalia, he had befriended a group of similarly aged Somali men. They played basketball together.
One friend described Kastigar to the Star Tribune as a “skinny kid” who liked tattoos.
“He was searching for something better, a better life,” another man, who lived at Kastigar’s mother’s house, told the Star Tribune. The man and Kastigar had engaged in numerous discussions about religion.
Kastigar left the United States for Africa to study the Qur’an in November 2008. He told his mother he was living in Kenya, and that he was having a good time.
“He’s a very big-hearted, loving person who was always very interested in the spiritual,” Kastigar’s mother, Julianne Boada, told the Minneapolis newspaper.
McCain posted a picture of Kastigar on his Facebook page when Kastigar died, declaring his belief that Kasitgar was by then in paradise.
After Kastigar’s death, al-Shabab proudly included him in a low-grade recruitment video.
“If you guys only knew how much fun we have over here,” he bragged in the video, according to ABC. “This is the real Disneyland.”
The radical, bearded Muslim added: “Come here and join us.”