Panic attacks can be caused by a combination of genetics (inborn traits passed down from generation to generation), trauma, environmental factors, and brain function. People who have other mental illnesses or a history of substance use may be at higher risk of developing a panic disorder than people who don’t have those experiences.