One case in which $\hat \mu$ may be a biased estimator of $\mu$: the samples $x_1,..., x_n$ are not uniformly randomly sampled from the population of interest. This is really two problems:
(1) Some values in the population are more likely to be sampled than others. A classic example of this is when we are looking at a voluntary polls of opinion. It seems very probably that people with strong opinions are more likely to complete the survey than people who are more indifferent.
(2) We have samples, but they are not from the population of interest. This somewhat seems like a cop-out, but in practice this is extremely common. For example, when we look at polls before an election, the population of interest is the actual votes cast on election night. Clearly, it's not possible to get any of those samples before the election, so we look at a population that has a distribution we assume/hope is close to the real distribution we care about and can be sampled: polls taken ahead of the election...and then we also either hope that we have a uniform random sample from that population, or we use methods to attempt to rebalance that estimator due to over/under representation of various groups. We may also try to adjust for potential changes in opinion of the population over time to account for the fact that we don't have samples from the population of interest, but may be able to model some of the relation between the population of interest and population we can sample.
I suspect this may not be the type of answer you were looking for: i.e., I think the OP may have been curious about the case when $x_i$ were uniformly sampled from the correct distribution, but the estimator could have been inconsistent (as noted, this can happen if the variance is undefined). I presented this answer as I think it's a much more common issue in practice and often should be considered more closely during applied analyses.