The good character who turns bad is a classic feature of literature. It is the essence of the literary form we call tragedy.
Thus Macbeth opens with high praise for the virtuous Macbeth:
Doubtful it stood;
As two spent swimmers that do cling together
And choke their art. The merciless Macdonwald,—
Worthy to be a rebel,—for to that
The multiplying villainies of nature
Do swarm upon him,—from the Western isles
Of kerns and gallowglasses is supplied;
And fortune, on his damned quarrel smiling,
Show'd like a rebel's whore. But all's too weak;
For brave Macbeth,—well he deserves that name,—
Disdaining fortune, with his brandish'd steel,
Which smok'd with bloody execution,
Like valour's minion,
Carv'd out his passage, till he fac'd the slave;
And ne'er shook hands, nor bade farewell to him,
Till he unseam'd him from the nave to the chaps,
And fix'd his head upon our battlements.
O valiant cousin! worthy gentleman!
As whence the sun 'gins his reflection
Shipwrecking storms and direful thunders break;
So from that spring, whence comfort seem'd to come
Discomfort swells. Mark, King of Scotland, mark:
No sooner justice had, with valour arm'd,
Compell'd these skipping kerns to trust their heels,
But the Norweyan lord, surveying vantage,
With furbish'd arms and new supplies of men,
Began a fresh assault.
Dismay'd not this
Our captains, Macbeth and Banquo?
As sparrows eagles, or the hare the lion.
But Macbeth turns bad, and thereby hangs the tragedy. This is all classic stuff and some of the greatest works of literature follow this pattern.
The challenge in what you propose, though, it that series literature, essentially popcorn books meant to be consumed quickly and ravenously, don't tend to deal much in tragedy. Their taste is more bitter than popcorn, and I'm not sure if the audience you will have built over the earlier books is going to be ready for bitter herbs with their popcorn.