Yes, it would explode. Most hand grenades are nowadays triggered chemically, electrically or contain a fuze enclosed within the assembly, so they don't require atmospheric oxygen to ignite, are watertight and otherwise more reliably go off at a preset time since activation.
Can things explode in space?
In space no one can hear you explode… Many astronomical objects such as novae, supernovae and black hole mergers are known to catastrophically 'explode'. But as long as the explosion doesn't require oxygen, then it will work in much the same way in space as on Earth. ...
What triggers a grenade to explode?
The user removes the safety pin before throwing, and once the grenade leaves the hand the safety lever gets released, allowing the striker to trigger a primer that ignites a fuze (sometimes called the delay element), which burns down to the detonator and explodes the main charge.