Yes, it does. You still got a kill. But I don't recommend doing that, though.
Source: Experience and Logic
When a Pokémon with Moxie causes another Pokémon (including allies) to faint through direct damage, its Attack rises by one stage.
As long as it's direct damage, yes, Moxie will activate.
Source