The legislation, to be passed early next year, follows growing concern among teachers and parents at the extent of bullying and harassment among students.
Studies have found that one child in six is bullied each week in Australian schools and that 50 per cent of children have been bullied in the past year.
At the first national conference on school violence in Melbourne, federal education minister Dr Brendan Nelson said Australia needed a uniform approach.
Last July, a meeting of state, territory and federal education ministers endorsed a "national safe schools framework" setting out actions schools can take to prevent bullying. These include developing appropriate policies, providing training for teachers, involving parents and encouraging students to report abuse.
Dr Nelson said the framework would be used as the basis for the legislation.
"All young Australians should, no matter what their circumstances may be, learn in a school environment that is free from bullying, harassment and abuse," the minister said.
The government will spend A$3 million (pound;1.3m) on providing appropriate training for teachers and principals in tackling bullying, violence and abuse.
A further A$1m will be used to help schools implement effective anti-bullying programmes and another $300,000 will be spent on producing materials for teachers.
"Most teachers in training receive little instruction on dealing with bullying, violence and child abuse," Dr Nelson said. "Only 36 per cent of new teachers recently surveyed felt their course adequately addressed these issues."
The government is also providing $200,000 to support a special website called Bullying No Way! (www.bullyingnoway.com.au) over the next five years.