I can't find a masters thesis advisor. Can I publish independently in a math journal and get my MSc degree that way?
Publishing an article and getting a degree are two different things.  One can do either of them without the other.  

At least at the Ph.D. level, the thesis should be of "publishable quality" but in some exceptional cases may not be published.  And of course many get masters degrees without publishing.

You can publish without an advisor.  But it seems unlikely you will get a degree without one.  (Some Ph.D. programs may have a masters degree by coursework and examinations that you receive during the course of your Ph.D. work.)  

Generally, the work for your degree is done after you have an advisor, in consultation with that advisor.  It is rare that you have the work done before you have an advisor.