Let $$\mathfrak{a}$$ , I, J be ideals of a Noetherian local ring $$(R,\mathfrak{m},k)$$ . Let M and N be finitely generated R-modules. We give a generalized version of the Duality Theorem for Cohen-Macaulay rings using local cohomology defined by a pair of ideals. We study the behavior of the endomorphism rings of $$H^t_{I,J}$$ (M) and $$H^t_{I,J}$$ (M)), where t is the smallest integer such that the local cohomology with respect to a pair of ideals is nonzero and D(−):= HomR(−, Er(k)) is the Matlis dual functor. We show that if R is a d-dimensional complete Cohen-Macaulay ring and $$H^i_{I,J}$$ (R) = 0 for all i ≠ t, the natural homomorphism R → Homr( $$H^t_{I,J}$$ (KR), $$H^t_{I,J}$$ (KR)) is an isomorphism, where KR denotes the canonical module of R. Also, we discuss the depth and Cohen-Macaulayness of the Matlis dual of the top local cohomology modules with respect to a pair of ideals.