Probably better to post in the US section of the forum, but anyway it is possible but it makes
taxes a nightmare, especially if you set up a corporation.
As a US citizen you should already be filing a 1040 every year as US citizens have to file regardless of where they live - if you haven't done this the IRS will require you to go back and file at least seven years of returns. Non-resident US citizens also have to file a Form 2555 or 2555-EZ to declare their foreign income and exclude it so they don't get taxed twice.
The foreign exclusion limit is $87,600, and you can also claim certain other benefits, but basically what it boils down to is that if you earn over roughly $100,000 then you will be paying tax in the US on your foreign income, even though you live abroad and pay tax there.
As a result it obviously makes more sense to have your tax home in the US, then you avoid this limit and you can just file Form 1116 to claim a foreign tax credit for taxes you pay in Canada - however as taxes are higher in Canada you will effectively pay the higher of the two levels, after you've claimed the credit.
So anyway, at a bare minimum you will be filing a T1 and a 1040 every year and if you set up a corporation you could be filing a multitude of other returns.
The tax treaty requires taxes to be paid proportionally based on where you physically are when the work is performed, so as a self-employed person for example you would have to register as self-employed in both countries and withhold payroll taxes proportionally, which in itself is quite complex but even more so if you use a corporation (or two, one in each country).
What tax residents of the US usually do is set up an S-corporation to make things simpler, but to do that obviously you need to be resident in the US. Or alternatively you could use a CCPC in Canada, but to do that your tax home must be in Canada. CCPCs are quite complex from a paperwork standpoint but there are more tax avoidance strategies using one than an S-corporation, really it depends on how much you earn, if you earn significantly more in a year than you want to spend, then a CCPC makes more sense.
Obviously as a resident of the US you are not entitled to the Canadian healthcare coverage, so you need to figure out that cost.
But really you need to figure out which country you want to be your principal residence and I'd say generally speaking the US is the better option when you look into the costs of everything but it really depends on where you plan to live and how much you think you'll earn.
Steve.