He wrote Two New Sciences while under house arrest after the Inquisition found him a heretic.
http://books.google.com/books?id=ewKMpRsF4Y8C&pg=PA47#v=onepage&q&f=false
http://books.google.com/books?id=KBKSyHOLzZAC&pg=PA96#v=onepage&q&f=false
http://en.wikipedia.org/wiki/Galileo_Galilei
He got in trouble for proposing that everything revolved around the earth - heliocentrism. Has nothing to do with the earth being flat, which was never a general belief.