No, if you total the car, your insurance company pays out the the total value of the vehicle to the leasing company (what that means depends on your policy. You may come out even, get sent a cheque for part of the value, or still owe cash.) 

You are responsible for the payment until the claim is settled between your insurer and the leasing company. If you simply hand the keys back to the leasing company, they have a right to keep charging the payments until the end of the lease, and then charge you for the remaining value at the end. Though I can't imagine they'd choose to handle it that way, knowing the car is written off.