Dominic Grieve said the right to report proceedings in the Commons and Lords without fear of legal recourse did not "necessarily extend" to all media.
Remarks repeated "out of context" might not be covered, he suggested.
He also warned MPs against revealing details of court orders in Parliament.
When court proceedings were active, parliamentarians should only refer to them in Parliament in "the most exceptional of circumstances", he said in a speech in London.
MPs are protected from prosecution over statements made in Parliament under what is known as parliamentary privilege - one of the oldest rights enshrined in British law.
But there was controversy earlier this year when Lib Dem MP John Hemming use it to name footballer Ryan Giggs in Parliament as someone who had been granted an injunction preventing reporting of his private life.
Mr Hemming justified the move - criticised by many other MPs at the time - by arguing that the information was already widely known to the public and he was not abusing the privilege as he could have named the footballer outside the Commons without being accused of contempt of court.
Parliamentary privilege was also used by Lord Stoneham to disclose a privacy order obtained by former chief executive of the Royal Bank of Scotland, Sir Fred Goodwin.
Referring to the issue of parliamentary privilege, Mr Grieve said that while - as an MP himself - he defended the right of Parliament to determine its own affairs it was "important to remember these are the privileges of Parliament as a whole and not that of the individual member".
"It ill serves the parliamentary process if court orders are openly flouted for no good reason," he added.
"It is not for a parliamentarian to ignore the careful and measured approach of a judge when deciding if an injunction should be granted.
"The House of Commons has resolved that the sub judice rule applies to proceedings which are active and they shall not be referred to in any motion, debate or question.
"Parliament and the Courts should each be left to do their work without interference by the other - save in the most exceptional of circumstances."
Mr Grieve, the government's senior law officer, also suggested the media must "beware" reporting anything said in Parliament which flouted court orders.
The extent of legal protection available to them in such cases had yet to be "authoritatively decided", he said.
"It is still an open question as to whether something said in Parliament in breach of a court order may be repeated in the press," he added.
"The privilege to report parliamentary proceedings, which is provided by the parliamentary papers act and covers Hansard, does not necessarily extend to all publications which are not published by order of Parliament.
"It is likely that it does extend to a fair and accurate report of proceedings in Parliament. But just because something has been said does not mean it can be repeated out of context."
A joint committee of Parliament is currently looking into whether there should be a change in the law relating to privacy injunctions, something many MPs think is necessary.
Next week it will take evidence from public figures such as Max Mosley, Steve Coogan and Hugh Grant.
The media must be careful about using parliamentary privilege as a defence for reporting remarks by MPs and peers which breach court injunctions, the attorney general has said.