After retiring from his duties as the Deputy Ban in 1712 due to illness, Keglevich was a member of the border commission for the Croatian Military Frontier borders on the Sava River, towards Carniola and on the Una River.