The mule need to be alive at the moment when the kill that awards the exp is made.
In other words, you can still cash in even if your low level mule gets hit by a damage over time effect such as Melf's Acid Arrow by wasting the opposition before the lowbie kicks the bucket.
Conversely, once you're happy with the levels of your main characters, you can reap MASSIVE kill exp for your mules by committing suicide with the high level dudes right before the opposition starts to crumble. Say, by letting them "mistakenly" stand within the area of effect of Horrid Wilting that wipes the smirk off the face of the enemies gathered around them for an "easy kill" and let the mules finish them off? Just leave one decently leveled Cleric out of it so that you can resurrect everyone afterwards..