In 2005, Lyne won a special election for mayor of Wichita Falls with an outright majority against eight opponents. He was reelected in 2006 with more than 90 percent of the votes cast and ran unopposed in 2008. In 2010, he ran not for mayor but in the Republican primary election for state representative. To win his party nomination, Lyne defeated, 60 to 40 percent, Joseph Anthony "Joe" Clement, also of Wichita Falls. In the general election on November 2, he defeated the Democrat Michael L. Smith, 74-26 percent. In the one legislative session in which Lanham served, he was assigned to the Ways and Means and Environmental Regulation committees. In 2011, Phyllis Schlafly's Eagle Forum rated Lyne 36 percent conservative. On the other hand, the Young Conservatives of Texas rated him 63 percent conservative. The Texas Association of Business gave him an 85 percent rating. The Sierra Club rated him 42 percent. Lyne voted to tax sales via the Internet if the company has a physical presence in Texas. Though the measure passed the House, 125-20, it was vetoed by Governor Rick Perry. He voted to reduce funding for state agencies. He voted against a bill to ban texting while driving, another measure which Perry vetoed. He voted against the law signed by Perry which permits corporal punishment in public schools but only with parental consent. Lyne voted against the House majority to ban smoking in most public places; Texas cities may also limit smoking by local measures. He voted for a House-approved amendment offered in 2011 by conservative Representative Wayne Christian to require public colleges and universities to fund student centers that promote family and traditional values. Lyne voted to restrict state funding to facilities which perform abortions. He supported the 2011 measure which requires women in Texas who procure abortions first to undergo an ultrasound to be informed of the progress in the development of the child. He voted for legislation, passed 102-40 in the House and signed by Governor Perry, which authorizes a county, when determining eligibility for a "sponsored alien" under the Indigent Health Care and Treatment Act, to include in the resources of the applicant any additional incomes of their spouse and sponsor. Just eight months after taking office as representative, Lyne announced that he would not seek a second term in the office. He expressed a need to devote greater time to his business, but he also voiced discontent with legislative procedures:
We don't ever get around to the discussions we need to have. It's easy for both sides to draw a line in the sand and just say, "We need more," and 'No, you don't,' without ever having a discussion about who needs what. Those are the things that frustrate me.... I think the thing that bothered me the most was not the political debates, because I expect those and I expect some crazy rhetoric to go with that sometimes. The thing that bothers me is the little things, what I would call petty behavior, kindergarten behavior: "If you vote against my bill I'm going to kill everything you have." That's an extreme way of putting it, but that's implied on a lot of things.