- Who should be used to refer to the subject of a sentence.
- Whom should be used to refer to the object of a verb or preposition.
Here subject of guilty is the man that's why we have to use "who" .
This is the man who we thought guilty proved to be innocent. is correct