What previous antivirus (AV) programs did you have on your machine before avast? What other resident programs do you have on your machine (firewall, cloud AV, etc.?)
When you are uninstalling the normal way (Control Panel > Add/Remove), disconnect from the Internet, do you then go into Safe Mode for the avast uninstaller tool then REBOOT? Sometimes 2 reboots does the trick.
Also, when you reinstall, try temporarily disabling your firewall or putting it into learning mode. Perhaps you are having some kind of conflict until you enter your exclusions in these programs.
In addition, on installation of avast, make sure you are on the Internet to update your definitions as well as registering your product.
If you still have problems, a few people have had to change the resident (paid) MBAM to on-demand...you can try this to see if this helps since MBAM usually loads on boot before avast.
If you have done the above and still having problems, please give us some additional informational information about your system. Thanks.