Let $R$ be a 2-torsion free semiprime ring with extended centroid $C$, $U$ the Utumi quotient ring of $R$ and $m,n>0$ are fixed integers. We show that if $R$ admits derivation $d$ such that $b[[d(x), x]_n,[y,d(y)]_m]=0$ for all $x,yin R$ where $0neq bin R$, then there exists a central idempotent element $e$ of $U$ such that $eU$ is commutative ring and $d$ induce a zero derivation on $(1-e)U$. We also obtain some related result in case $R$ is a non-commutative Banach algebra and d continuous or spectrally bounded.