We present results on the search for double-electron capture ($2\nu\text{ECEC}$) of $^{124}$Xe and neutrinoless double-$\beta$ decay ($0\nu\beta\beta$) of $^{136}$Xe in XENON1T. We consider captures from the K- up to the N-shell in the $2\nu\text{ECEC}$ signal model and measure a total half-life of $T_{1/2}^{2\nu\text{ECEC}}=(1.1\pm0.2_\text{stat}\pm0.1_\text{sys})\times 10^{22}\;\text{yr}$ with a $0.87\;\text{kg}\times\text{yr}$ isotope exposure. The statistical significance of the signal is $7.0\,\sigma$. We use XENON1T data with $36.16\;\text{kg}\times\text{yr}$ of $^{136}$Xe exposure to search for $0\nu\beta\beta$. We find no evidence of a signal and set a lower limit on the half-life of $T_{1/2}^{0\nu\beta\beta}>1.2 \times 10^{24}\;\text{yr}\; \text{at}\; 90\,\%\;\text{CL}$. This is the best result from a dark matter detector without an enriched target to date. We also report projections on the sensitivity of XENONnT to $0\nu\beta\beta$. Assuming a $275\;\text{kg}\times\text{yr}$ $^{136}$Xe exposure, the expected sensitivity is $T_{1/2}^{0\nu\beta\beta}>2.1 \times 10^{25}\;\text{yr}\; \text{at}\; 90\,\%\;\text{CL}$, corresponding to an effective Majorana mass range of $\langle m_{\beta\beta} \rangle<(0.19 - 0.59)\;\text{eV/c}^2$.