Ms. Maness said Mr. Hicks would often seek to have cars towed from the complex’s lot, either because they did not have stickers or because he did not recognize them. And she said he would complain about noise — he was upset when she and her friends were playing a card game and he thought they were too noisy, and he was again upset when she pulled into the lot with music playing loudly in her car.

“He was definitely aggressive, and he spoke harshly when he was upset,” she said.

The police say they never received any formal complaints, but Mr. Hicks, a 46-year-old former auto parts dealer who has been studying to become a paralegal, appears to have functioned as a self-appointed watchman in the complex. The Chapel Hill police released a report about a 2013 incident in which he apparently called them to complain that someone had allegedly grabbed a tow-truck driver’s arm while he was trying to tow a car. And just last month, he wrote on Facebook that he had called the police because he saw a couple having sex in a car in the parking lot.

Public records reveal only the barest of details about Mr. Hicks, who turned himself in after the shooting. He appears to have moved around the country several times. He voted in two recent North Carolina elections, once as a Democrat and once on a nonpartisan ballot. He has been divorced twice. His current wife, Karen Hicks, is now planning to seek a divorce, according to her lawyer, Rob Maitland.

“She doesn’t feel safe,” Mr. Maitland said. “She is outraged and heartbroken over all of this.”

Mr. Hicks’s Facebook page suggests that he has a strong interest in atheism and is contemptuous of religion; the page is filled with posts and cartoons mocking the intelligence of people who believe in the Bible. His anger appeared to be aimed primarily at Christians — in fact, in 2010 he decried as hypocritical opposition by Christians to a much-debated proposal for a mosque to be built near ground zero in Manhattan.

He also indicated that he was proud of owning a weapon: Last month, he posted an image of a gun on a scale with the words, “Yes, that is 1 pound 5.1 ounces for my loaded 38 revolver, its holster, and five extra rounds in a speedloader.”