Thanks for the chance to help. I am an attorney with over 12 years experience. Hopefully I can help you with your legal question.
Most of what you describe is not, in and of itself criminal.
It is not a crime to pick up a gun from the street.
It is not a crime to carry it away after finding it.
It is not a crime to throw the gun out a window (other than perhaps littering)
It could be a crime to "run from the police"...that would depend on the circumstances. But if the police are attempting to detain you and you are running from them to prevent detention that would be a crime.
I will say the entire version you tell does not sound credible.
Not saying you are making it up...it is just that there are several elements of your story that are each unlikely. When strung together it makes the entire story less likely. Again, I am not questioning your honesty. Heck, I do not even know you. But if I heard this from a client I would think that it sounded incredible.
So you may want to consider that before going to the police, since if they believe you are lying, they could charge you with lying to the police...and that would be a crime.
It may be better to work with your friends lawyer on this matter...and I would urge you to seek a local attorney as well, again to protect yourself. If you relate this tale, you open yourself up to charges of evading arrest at a minimum and perhaps also charges of lying to police.
If convicted of evading arrest, I would expect that it would be a misdemeanor
conviction, with no priors I would expect probation
But if they charge lying to police it could be you face felony charges.