You either have a completely dead MAF or a vacuum leak, perhaps in the intake bellows/boot to the throttle body.
The only way to get the CEL to turn off is to fix the real problem. Either find your vacuum leak or replace the MAF with a good used one or a new one.
Running with the MAF disconnected is making your ECU will go into open-loop mode, where it ignores the MAF signal and calculates in an "average" baseline figure. This means you will suffer on power and fuel mileage and emissions.
Its apparent the signal that the ECU gets from the MAF when its hooked up is much further off than what it should be. Hence, with it disconnected it runs better with the ECU's "educated guess"