Maze surgery treats electrophysiological problems such as atrial fibrillation by creating a pattern, or maze, of scars in the upper chambers of the heart. The scar tissue effectively blocks the faulty electrical signals that cause irregular heartbeats.