CHICAGO — President Obama came home on Friday for a policy speech that inevitably turned personal: He spoke of teaching law nearby, meeting his wife, Michelle, raising their daughters less than a mile away and then, most recently, watching the first lady return for the funeral of a vivacious teenager gunned down in a park.

Less than two minutes into his remarks at the mostly African-American Hyde Park Academy high school, Mr. Obama paid tribute to 15-year-old Hadiya Pendleton, a girl who had been just a bit older than his daughter Malia, but who now represents Mr. Obama’s private connection to the gun violence that he has only begun to address in his second term.

Ms. Pendleton had attended a nearby high school until she was caught in what the police say was gang gunfire just days after she had marched in the president’s second inaugural parade. In the audience here were her parents, Cleopatra Cowley-Pendleton and Nathaniel Pendleton Sr., the latest involuntary activists for gun safety. On Tuesday, they sat with Mrs. Obama in the House gallery for Mr. Obama’s State of the Union address. When the president recognized them here on Friday, there was awkward applause, as if people were unsure whether losing a child was reason to clap.

“Unfortunately, what happened to Hadiya is not unique,” Mr. Obama said. “It’s not unique to Chicago. It’s not unique to this country. Too many of our children are being taken away from us.”