The truth is, he didn't actually write her a letter.

Literal

Actually he [topic-は] her [target-に] letter [object-を] did-not-write [explanatory-のである].

本当は ('the truth is') sets up a correction of a mistaken assumption. のである adds emphatic explanation — the speaker is asserting this as a fact that needs to be understood. 書かなかった is the plain past negative.