In her current column in The Chronicle of Higher Education, Ms. Mentor discusses some academic novels of note, including those that kill off some of the more notorious characters we've all run across in our years (short or long) going around in academic circles. In addition to her mention of Kingsley Amis' Lucky Jim, Randall Jarrell's Pictures from an Institution, David Lodge's David Lodge's Changing Places and Small World, and Amanda Cross' (Carolyn Heilbrun's) An Imperfect Spy, among others, might I include Malcolm Bradbury's wonderful Eating People Is Wrong, A. S. Byatt's Possession: A Romance, Rebecca Goldstein's provocative The Mind-Body Problem, and Alison Lurie's The War Between the Tates (made into a tv movie in 1977). Bill Brewer has a list of such novels here.
Academic mysteries are a subgenre; check out authors by J. S. Borthwick (featuring Sarah Deane) and Edith Skom (featuring Beth Austin). There are webpages devoted to such works here and here.
Why would one read such novels? They're such fun, if one isn't the target. But if one is the writer, one might want to beware of some potential legal problems.
Legal dangers to avoid when writing one's tribute or critique of the academic world? Defamation by fiction comes to mind. How could that be possible when one is writing fiction? After all, part of the plaintiff's requirement in making out a defamation case is to show that a statement is "of and concerning her." This is tremendously difficult in a defamation by fiction case. If the work is fictional how can it be about her? What the plaintiff has to show is that at least some people who know her can figure out that the fictional character is meant to be her. According to one New York court, "For a fictional character to constitute actionable defamation, the description of the fictional character must be so closely akin to the real person claiming to be defamed that a reader of the book, knowing the real person, would have no difficulty linking the two. Superficial similarities are insufficient as is a common first name." Springer v. Viking Press, 90 A.D. 2d 315 (1982).
See above all the California case of Bindrim v. Mitchell, with commentary on the issue here from the First Amendment Center. Other claims that an unhappy colleague (or former colleague) claiming to recognize herself in a fictional work might make include false light. And now, as the Duke famously said to Mr. Gibbon, "Scribble, scribble..."