His intent may have been twofold: To take revenge on Moira, and to put his heir in charge of Merlyn Global. We'll have to see about that.
The flaw here is, for the paternity test to stand up in court, there has to be proof that the test actually compared Thea's blood to Malcolm's. What I mean, it's not like Malcolm and Moira went into the clinic with Thea and everyone showed their ID.
problem with your theory about an heir to take over Merlyn Global was he already had one (well until the undertaking brought the Glades crashing down).