Since the motor with the flywheel is being used as a generator
shouldn't the current be always negative?
No, it should always be positive (as your second circuit indicates).
So why does the current initially go negative? The unloaded motor has higher rpm due to not being loaded down with a flywheel, so it initially generates a higher voltage which pushes current into the flywheel motor. But the current drawn out of it causes it to slow down until it produces less voltage than the flywheel motor, which then pushes current back into it.
This behavior can be simulated with electronic components by using capacitors to represent the motor/flywheel inertia. Here's a simulation I made in LTspice:-
C1 and C2 represent the inertia of each motor, R1 and R2 are their internal resistances, and R3 and R4 absorb the 'iron' losses (magnetic, friction etc.). The flywheel motor has higher loss due to higher bearing loading and flywheel windage.
Here is the result:-
When power is applied the unloaded motor gets up to speed quicker due to its lower inertia (represented by smaller capacitance). During this time both motors are drawing current from the supply, but the unloaded motor draws less current due to lower torque load, producing less voltage drop across its internal resistance and allowing it to spin faster and generate higher voltage.
When switched off the unloaded motor initially generates higher voltage, which causes the current to go negative as it drives the flywheel motor. But this current creates a torque drag which quickly slows it down until its voltage drops below the flywheel motor. At that point the current turns positive again as the flywheel motor drives the unloaded motor.