In March 2010, following the resignation of Republican state representative Ray Sansom on corruption charges in February 2010, Gaetz ran in the special election to succeed Sansom in the 4th District, which included southern Santa Rosa County and Okaloosa County.
In a crowded Republican primary that included Craig Barker, Kabe Woods, Jerry G. Melvin, and Bill Garvie, Gaetz won with 43% of the vote.
In the special general election, Gaetz defeated Democratic nominee Jan Fernald, winning 66% of the vote.
During his campaign, Gaetz received almost $480,000 in contributions, about five times more than anyone else in the primary had raised, and almost 50 times more than Fernald, including $100,000 of his own money.

Gaetz was unopposed for a full term in 2010.
In 2012, following the reconfiguration of Florida House of Representatives districts, Gaetz's district no longer contained any of Santa Rosa County.
He was reelected, unopposed, in 2012 and 2014.

While serving in the state house, Gaetz joined with state senator Joe Negron to propose legislation "designed to accelerate the execution of many of the 404 inmates on Florida's death row" by requiring the governor to sign a death warrant for those inmates who have exhausted their appeals, noting, "Only God can judge.
But we can sure set up the meeting."
He also joined forces with state senator Greg Evers to propose legislation that eliminated the federal ethanol content mandate that 10% of gasoline sold in Florida contain ethanol; the legislation was signed by Governor Rick Scott in May 2013.

Following the trial of George Zimmerman for the shooting of Trayvon Martin, Will Weatherford, the speaker of the Florida House of Representatives, announced that he would order hearings on the "stand-your-ground" law that was raised as an issue during the trial.
Gaetz, the chairman of the Criminal Justice Subcommittee, was tasked with reviewing the legislation, and announced before hearings that he would not support changing "one damn comma," though he indicated that he would listen to both sides' testimony during the hearings.
Following the conclusion of the hearings, he authored legislation that would allow defendants who successfully used a "stand your ground" defense during their trial "to apply for a 'certificate of eligibility' to expunge information related to 'stand your ground' from their criminal records."

When his subcommittee was considering legislation that would "keep mug shots of people who are charged with crimes off the Internet until they are convicted," Gaetz brought up his 2008 arrest and non-conviction, arguing that his mistakes made him who he is and that publicly available mug shots "could be a problem for those unaccustomed to publicity."
In March 2010, following the resignation of Republican state representative Ray Sansom on corruption charges in February 2010, Gaetz ran in the special election to succeed Sansom in the 4th District, which included southern Santa Rosa County and Okaloosa County. In a crowded Republican primary that included Craig Barker, Kabe Woods, Jerry G. Melvin, and Bill Garvie, Gaetz won with 43% of the vote. In the special general election, Gaetz defeated Democratic nominee Jan Fernald, winning 66% of the vote. During his campaign, Gaetz received almost $480,000 in contributions, about five times more than anyone else in the primary had raised, and almost 50 times more than Fernald, including $100,000 of his own money.
Gaetz was unopposed for a full term in 2010. In 2012, following the reconfiguration of Florida House of Representatives districts, Gaetz's district no longer contained any of Santa Rosa County. He was reelected, unopposed, in 2012 and 2014.
While serving in the state house, Gaetz joined with state senator Joe Negron to propose legislation "designed to accelerate the execution of many of the 404 inmates on Florida's death row" by requiring the governor to sign a death warrant for those inmates who have exhausted their appeals, noting, "Only God can judge. But we can sure set up the meeting." He also joined forces with state senator Greg Evers to propose legislation that eliminated the federal ethanol content mandate that 10% of gasoline sold in Florida contain ethanol; the legislation was signed by Governor Rick Scott in May 2013.
Following the trial of George Zimmerman for the shooting of Trayvon Martin, Will Weatherford, the speaker of the Florida House of Representatives, announced that he would order hearings on the "stand-your-ground" law that was raised as an issue during the trial. Gaetz, the chairman of the Criminal Justice Subcommittee, was tasked with reviewing the legislation, and announced before hearings that he would not support changing "one damn comma," though he indicated that he would listen to both sides' testimony during the hearings. Following the conclusion of the hearings, he authored legislation that would allow defendants who successfully used a "stand your ground" defense during their trial "to apply for a 'certificate of eligibility' to expunge information related to 'stand your ground' from their criminal records."
When his subcommittee was considering legislation that would "keep mug shots of people who are charged with crimes off the Internet until they are convicted," Gaetz brought up his 2008 arrest and non-conviction, arguing that his mistakes made him who he is and that publicly available mug shots "could be a problem for those unaccustomed to publicity."
Matt Gaetz