Nimrod in the Bible was the great-grandson of Noah through the line of Cush (Genesis 10:8). Nimrod is described as the first of the “mighty men” to appear on the earth after the great flood. Previous to the flood, there had been giants and mighty men on the earth, and “also afterward” (Genesis 6:4). From examination of the biblical texts and other ancient documents, it is clear that Nimrod was one of these mighty men, and there is also evidence that he was much larger than the average man—a giant, so to speak.
Today, it is meant to imply a person is an idiot or clueless. Not sure where (or why) the flip from hero to idiot happened.