We estimate contributions from Kaluza-Klein excitations of third generation quarks and gauge bosons to the branching ratio of B→Xsγ decay process in the five-dimensional universal extra dimensional scenario with nonvanishing boundary localized terms. This model is conventionally known as the nonminimal universal extra dimensional model. We have derived the lower limit on the size of the extra dimension by comparing our theoretical estimation of the branching ratio that includes next-to-next-to leading order QCD corrections with its experimentally measured value. Coefficients of the boundary localized terms have also been constrained. 95% C.L. lower limit on the inverse of the radius of compactification (R-1) can be as large as 670 GeV for some choice of the value of coefficients of boundary localized terms. © 2017 American Physical Society.