We had a peke that did something similar to this. Honestly, we thought he was just being a dog and chasing his tail, until he literally chewed have of it off and I had to pick up a bloody tail of the floor.

Long story short, he had disentigrating disks in his back that were affecting his nerves and causing him a great deal of pain. We were told he could be kept on tranquilizers and nerve meds, but it seemed cruel to me. (He was drugged all the time.) Anyway, I would suggest having X-rays of the pup's back done as well if the problem persists. Better safe than sorry.