Hey Ootred,
The sentence 'lying on the ground' would be the correct one in that context. Both 'lay' and 'lie' mean the same but grammatically they behave differently: 'lay' needs an object (for example: someone (subject) is laying (verb) something (object) down) while 'lie' is intransitive, it does not need an object (like in the case of your structure 'the man (subject) was lying (verb) on the ground').
Hope that is helpful for you.
Do not hesitate to contact me for more information
Oana