“whatever work it was in him to do” . A quote from the essay "How to grow old" by Bertrand Russell.
As a human being the man had potential. A potential to do (good) work. Maybe due to his fundamental abilities. He has now, presumably in old age, met his full potential. Achieved that which he could reasonably achieve.
So we could replace the quote with “his full potential”.
If we extend the quote we see the bigger picture: “in an old man who has known human joys and sorrows, and has achieved whatever work it was in him to do, the fear of death is somewhat abject and ignoble.
So, he has experienced the full "joys and sorrows of life", and achieved his full potential. Russell is saying that such a man cannot justifiably fear death. (How I wish I could be described in those terms.)
I think Bertrand Russell wrote this quite late in his life. Possibly when he was 81? That would make the year 1953, more or less.
Why did Russell use this particular style and phraseology at this time? Is he using archaic language, just being ‘arty’, or making a point? The problem with genius is that it can be very hard to interpret.