The first openly gay member of the House of Representatives, Trent Zimmerman, has used his maiden speech to back the legalisation of same-sex marriage and target those who "peddle prejudice" against others.

Mr Zimmerman, who replaced former treasurer Joe Hockey in the blue ribbon seat of North Sydney late last year, also called for fixed four-year terms for federal Parliament to avoid distracting speculation about election timing.

Mr Zimmerman said he had rejected advice not to focus on his sexuality in the speech.

"Some have said to me this is not an issue I need reflect upon, particularly on an occasion such as this," he said.