asiseeit/iStockphoto. A maze procedure is a surgery used to control atrial fibrillation, or a-fib, a heart condition where the heart rhythm is irregular. If it can't be controlled by medication or other treatments, a maze procedure may be an appropriate treatment.