The first person I can find in the Bible that is said to be fasting is David (2 Samuel 12:21-23).
However, most Jewish and Christian teachers believe the the command to the Israelites to "afflict your souls" (Leviticus 16:29; Leviticus 23:27, 29, 32) refers to a time of fasting. This is supported by Isaiah 58:3 (listed below).
"Wherefore have we fasted, say they, and thou seest not? wherefore have we afflicted our soul, and thou takest no knowledge? Behold, in the day of your fast ye find pleasure, and exact all your labours."
This being the case, it is almost certain that the Jews fasted once a year on the day of atonement long before we read of David fasting.