Connery was originally offered Gandalf for the Jackson film. The movie was still pretty low budget and desperately needed a star so he was offered points on the back end. He read the script and found it too confusing so he passed. LotR was one of the biggest successes of its era and he may have passed on the biggest payday in Hollywood history.
Connery vowed not to make the mistake twice so when League of Extraordinary Gentlemen came his way he accepted despite finding the script confusing. It was a massive bomb and a critical disaster. Sean Connery said fuck it and retired from acting shortly after.