He was, in fact, a socialist. His libertarianism was how he justified his libertine lifestyle.
He was a socialist in his early years, granted...but he did a complete 180 as he matured.
His Hugo Award winning novel The Moon is a Harsh Mistress (just as an example) is a work which espouses economic freedom, not collectivism. Its well known as one of the greatest Libertarian sf novels of all time.