this has been the topic of recent posts. This might be one of the few good uses for WD-40. Apply to chain, wipe, ride for a spin, reapply & wipe. If the chain hasn't rusted beyond surface you may get it looking good, or at least ok just by getting it back in use with a penetrating oil, then a good chain lube.
At least worth trying!