Note: This is essentially the same as picakhu's solution, but slightly more fleshed-out.
Before addressing the problem itself, I'd like to make a simple auxiliary observation:
In an acute triangle draw the three altitudes and note that they split the angles into neighboring angles $\color{green}{\alpha'}, \color{red}{\alpha''}, \color{violet}{\beta'}, \color{green}{\beta''}, \color{red}{\gamma'}, \color{violet}{\gamma''}$ as indicated in the picture:

and $\color{green}{\alpha'} = \color{green}{\beta''}$, $\color{violet}{\beta'} = \color{violet}{\gamma''}$ and $\color{red}{\gamma'} = \color{red}{\alpha''}$.
Following your construction ($H$ orthocenter of $\triangle ABC$; $P$ on $BC$ arbitrary; $M$: second point of intersection of $AB$ with the circle through $BHP$; $N$: second point of intersection of $AC$ with the circle through $CHP$, using the above simple fact and the inscribed angle theorem, we see at a glance that all the angles of the same color in the following picture have the same size (ignore the dashed turquoise circle for the moment):

Assuming that both $M$ and $N$ lie inside the segment $AB$ and $AC$, respectively (otherwise the argument is a bit simpler) $ \angle AMH + \angle ANH = (\pi-\angle HMB) + (\pi-\angle HNC) = \angle HPB + \angle HPC = \pi $ so that $AMHN$ is a circular quadrilateral. But from this we see that $\angle HAN = \angle HMN$ and $\angle HAM = \angle HNM$ and we're done since $HM$, $HN$, $HP$ are the angular bisectors of the orange triangle $MNP$ so that $H$ is the center of the incircle.
Here's a picture showing that the claim doesn't hold if the triangle $ABC$ is not acute.

I leave it to you to verify that you get an excircle as soon as the triangle is obtuse and treat the two right-angled cases.