I'm guessing you can't do it with that motor. To generate you need a way to make the rotor magnetic, with alternating poles, something your motor as it stands can't do.
A universal motor such as yours as mentioned is not a good choice, you could make it work by replacing the armature with neo magnets, but its a lot of effort.
You can make an induction motor make power by applying a impulse from a battery on one of its windings, however as max said still not an excellent choice.
A permanent magnet treadmill motor is a better one.
Yeah your right max I hadnt seen that.
4 pole is around 1440 rpm.
So giving the run winding a kick once the motor is turning may start the thing to generate, bit of a pain to do for something in common use.