Didactic

Intended to teach, particularly in having moral instruction as an ulterior motive.