What is the model number of your engine so we can see what type of system you have. If the motor started fine and the battery went dead while you were using it there might be some other problem, need input.
I beleave you have a stator under the flywheel to charge battery. You said you had 13.8 volts when reved up, thats good. You can probably mount a volt meter in dash to watch charging system, should operate with key. As long as you see an increase from battery voltage when over about 2000 RPM you should be good to go. Sounds like your old battery is junk.