Let $P(i)$ the probability function of the distribution of the smallest value.
$$P(i)=P(\text{the smallest value = i})=$$
$$=P(\text{no value < i }\,\cap\,\text{at least one value = i} )=$$
$$=P(\text{all values} \ge i)·P(\text{at least one value = i | all values} \ge i)$$
You haven't mentioned it, but if we can assume that the $N$ values are chosen independently and with replacement, $P(\text{all values} \ge i)$ and $P(\text{at least one value = i | all values} \ge i)$ can be computed using just the binomial distribution.
$M-i+1$ of the $M$ possible values are larger or equal than $i$, then:
$$P(\text{all values} \ge i)=\bigg(\frac{M-i+1}{M}\bigg)^N$$
And among the $M-i+1$ values larger or equal than $i$, $M-i$ are larger than $i$, then:
$$P(\text{at least one value = i | all values} \ge i)=$$
$$=1-P(\text{all values > i | all values} \ge i)=$$
$$=1-\bigg(\frac{M-i}{M-i+1}\bigg)^N$$
Then:
$$P(i)=P(\text{the smallest value = i})=$$
$$=\bigg(\frac{M-i+1}{M}\bigg)^N·\bigg(1-\bigg(\frac{M-i}{M-i+1}\bigg)^N\bigg)$$
And just an example:
> N<-6
> M<-10
> i<-1:M
> pti<-((M-i+1)/M)^N
> pai<-1-((M-i)/(M-i+1))^N
> (pr<-pti*pai)
[1] 0.468559 0.269297 0.144495 0.070993 0.031031 0.011529 0.003367 0.000665 0.000063 0.000001
That is, if you randomly chose 6 numbers with replacement from $\{1,2,3,4,5,6,7,8,9,10\}$, the probability of the smallest being 1 is 48.86%, of being 2 is 26.92%, and so.