Munarini (J Integer Seq 23: Article 20.3.8, 2020) recently showed that the derangement polynomial \(d_n(q)=\sum _{\sigma \in {\mathcal {D}}_n}q^{{{\,\textrm{maj}\,}}(\sigma )}\) is expressible as the determinant of either an \(n\times n\) tridiagonal matrix or an \(n\times n\) lower Hessenberg matrix. Qi et al. (Cogent Math 3:1232878, 2016) showed that the classical derangement number \(d_n=n!\sum _{k=0}^n\frac{(-1)^k}{k!}\) is expressible as a tridiagonal determinant of order \(n+1\) . We show in this work that similar determinantal expressions exist for the type B derangement polynomial \(d_n^B(q)=\sum _{\sigma \in {\mathcal {D}}_n^B}q^{{{\,\textrm{fmaj}\,}}(\sigma )}\) studied previously by Chow (Sém Lothar Combin 55:B55b, 2006), and the type D derangement polynomial \(d_n^D(q)=\sum _{\sigma \in {\mathcal {D}}_n^D}q^{{{\,\textrm{maj}\,}}(\sigma )}\) studied recently by Chow (Taiwanese J Math 27(4):629–646, 2023). Representations of the types B and D derangement numbers \(d_n^B\) and \(d_n^D\) as determinants of order \(n+1\) are also presented.