The Adventures or Huckleberry Finn was published in 1884, however, the story is set in the mid 1800's. This was a very controversial time; slavery was legal, and there were contrasting political views. An important figure in the mid 1800's was Frederick Douglas, a literate black man who spent his life fighting as an abolitionist.
Mark Twain declared his political and moral views through his books, which were very controversial for the political world he lived in. He was opinionated and well read, persuading people to share the same views as him.