A reply to /u/ManicMarine
Ugggggghhhhh ... this is such a good question and such a complex topic at the same time ...... ! :D
First we must set the scene properly in terms of how the "military fiscal state" was evolving in that era. He had set up a "state within state" system whereby he controlled not only the army and its logistics, but also the collection of "revenue" through taxation and other means, to supply his army. In this sense, he was a highly innovative commander. He had come at just the right time, too, as the Imperials needed help in 1625 as Tilly's Catholic League forces were overstretched and Spain's army of Spinola was tied up in the Low Countries, and there were rumors of new movements by Bethlen Gabor from Transylvania. So Ferdinand made Wallenstein "chief of all our troops already serving, whether in HRE or Netherlands," and to "create a field army, whether from existing units or new regiments, to be 24,000 men in all." Now, Ferdinand did not nearly have money to pay for all this, so as the campaign progressed, Wallenstein was rewarded with confiscated estates from HRE princes. At this point, Wallenstein largely followed strategic direction from Ferdinand as he campaigned northwards against Denmark and into the Baltics. As time progressed, his army ballooned in size to around 150,000 troops as it had to not only challenge its opponents, it also had to occupy territories it had conquered. He argued that it was the only way to keep Saxony and Bavaria's princes loyal, not to mention rebellious peasants at various towns and villages. Thus, in order to maintain his army Wallenstein started to impose a fixed taxation system, paid every week, called the "contribution system". At the same time he started to sell commission even to criminals and foreigners in order to raise revenue. This led to colonels and captains profiteering and abusing the populace.
The three aspects above (confiscating estates and giving them to Wallenstein, taxation, selling of officership) started to be an issue with HRE Electors. In 1627, while they met to discuss the Edict of Restitution, they complained bitterly. As there was still war, Ferdinand ignored them. However, by 1630 the complaints could not be ignored anymore. Both the Electors and the Pope complained that Wallenstein's very presence was the only thing in the way of peace.
When Ferdinand finally dismissed Wallenstein, it was said that Wallenstein "seems to have been almost relieved" as he knew his army was unwieldy and beyond maintenance. He retired to his estates in Bohemia and his erstwhile chief financier Hans de Witte, who had staked his family's fortune on this army, committed suicide. Unsurprisingly, troops of the army became restless and there was mutiny and violence.
Of course, things went badly for Ferdinand as Sweden entered the war, and Tilly was killed in battle. So by 1632, Wallenstein was back as commander of the Imperial forces, and needed only three months to raise a major army. It is said that he took command only reluctantly, past his prime at age 49. Successes immediately followed in Bohemia, Silesia, and Saxony. He made one tactical mistake in Lutzen, but survived albeit with significant losses. Just as before, it was a major issue where to quarter the army. By this point it was preferred to place them in enemy territory such that friendly territory isn't subjected to taxation and violence. In winter 1633-34, Wallenstein insisted to quarter his troops on Habsburg lands in Bohemia for security reasons; following Lutzen, it was really unclear what had happened to the opposing armies and not much was known about their locations. So in a way, he was justified in seeking friendly territory for quartering his troops. This, after a fairly slow campaigning season that appeared to achieve little for Ferdinand. His other excuse was that he had tried to exploit political disagreement between Sweden and Saxony, arranging a cease fire and opening a negotiation. These may have seemed excessive, but not outside the powers which were vested in him at the time. However, at the same time, the campaign of Spain's Cardinal-Infante had just started, except that it was kept under separate command instead of placed under Wallenstein. The sum of all this was the bruising of Wallenstein's relationship with the courtiers in Vienna. Wallenstein had criticized the Edict of Restitution and the HRE's continuing support of Spanish campaigns up the Rhineland to the Low Countries; and he was said to claim he alone would negotiate peace with the Protestants, at least the Lutherans. Now he had his army in Bohemia, his personal duchy, and the sum of all this was the perception of threat.
What became remarkable was his extraction of oath of personal loyalty from his Colonels. This brought the relationship truly sour, the Ferdinand declared him rebel. But even further than that, the winter spent in Bohemia was also a time of trouble for his officers. There was a so-called "Prague blood tribunal" in which dozens of officers were executed for cowardice. So to his officers, he appeared to be looking for a scapegoat for the seemingly fruitless campaigns of 1633. His co-commander Piccolomini had personally requested clemency for an officer, yet this was declined. Even worse, to states of the Catholic League, Wallenstein was seen as an opportunist as he both sold officerships to raise money, and yet offered larger salaries and benefits to poach officers from allied armies of the League. As both his relationships with the emperor soured and so did his relationship with theoretical allies, and so did the loyalty of his men; this offered the perfect opportunity that led to his murder.
So back to the question: was he a traitor? Circumstances changed around him, both due to him and due to the emperor, the elector princes, and Spanish interest in the Spanish Road and the Low Countries. I think he was caught in the struggle of early-modern europe, and he ended up with an army that nobody could tolerate. In the end it was clear he was likely to have been disloyal, but up to the summer 1633 he was loyal to the emperor.
A further question could be asked, was far, how wide, and how long had he sustained what seemed to be limitless ambition, which some say was to become king or emperor himself. This is an enduring myth of Wallenstein, helped with the fact that he rose very, very highly. But some modern historians have compared his trajectory with those of his peer and Mortimer -- author of several critical books on the 30YW -- agree with others that the choices he made was not out of the ordinary. Mortimer further contended that Wallenstein was a very smart man in his responding to changing circumstances, and indeed the 30YW was a very interesting time. Even going back to his first proposal to raise an army, it should be kept in mind that he was Prince of Friedland, thus he had every reason to back the emperor in defending Bohemian lands. More strongly, some authors have contended that his failure was partly due to his lack of ambition. That if he had done more to control the politics of the court, then he will have been able to leverage the emperor's patronage.
TL;DR Complicated subject, you can judge for yourself.