The differential branching fraction with respect to the dimuon invariant mass squared, and the $C!P$ asymmetry of the $B^pmtopi^pmmu^+mu^-$ decay are measured for the first time. The CKM matrix elements $|V_{td}|$ and $|V_{ts}|$, and the ratio $|V_{td}/V_{ts}|$ are determined. The analysis is performed using proton-proton collision data corresponding to an integrated luminosity of 3.0 fb$^{-1}$, collected by the LHCb experiment at centre-of-mass energies of 7 and 8 TeV. The total branching fraction and $C!P$ asymmetry of $B^pmtopi^pmmu^+mu^-$ decays are measured to be begin{eqnarray} mathcal{B}(B^pmtopi^pmmu^+mu^-) &=& (1.83 pm 0.24 pm 0.05) times 10^{-8},,,mathrm{and} onumber mathcal{A}_{C!P}(B^pmtopi^pmmu^+mu^-) &=& -0.11 pm 0.12 pm 0.01,, onumber end{eqnarray} where the first uncertainties are statistical and the second are systematic. These are the most precise measurements of these observables to date, and they are compatible with the predictions of the Standard Model.