Over the past four years, prosecutors have alleged that Netanyahu exchanged regulatory favours with media owners in Israel seeking positive press coverage.
They also accuse him of accepting pricey gifts - including cigars and pink champagne - in exchange for advancing the personal interests of a millionaire Hollywood producer.
Netanyahu told the three-judge panel that Israeli media had launched "absurd" attacks on him over the years. He said it was "doubly absurd" to suggest the presents he had received from wealthy friends were illicit.
In a long diatribe, the prime minister, who leads the right-wing Likud party, criticised his country's media for what he suggested was its leftist stance.
He accused Israeli journalists of hostility towards him over the years because he did not join the push for a Palestinian state.
Standing rather than sitting through his testimony, Netanyahu said: "Had I wanted good coverage all I would have had to have done would be to signal toward a two-state solution... Had I moved two steps to the left I would have been hailed."
The Israeli PM smiled widely when he first entered the Tel Aviv District Court around 10:00 local time (08:00 GMT) and stayed until proceedings concluded just before 16:00.
The trial was moved from Jerusalem after being delayed for security reasons and convened in a small underground courtroom that also serves as a bomb shelter.
A limited number of accredited journalists were able to enter to report - others had to follow via a live feed from a room on the floor above.
Testifying is expected to take up a large portion of Netanyahu's time over the coming weeks. Last week, judges ruled that he must appear twice in court this week and then three times a week going forward.
He is expected to shuttle between the courthouse and the war room at the nearby Israeli defence ministry.