By Michael Ausiello
Updated January 12, 2010 at 06:59 PM EST

Kinky ABC has OK’d a kind of “wife swap,” lending out Desperate Housewives‘ Dana Delany to Castle for two episodes, sources confirm to me exclusively.

But Delany won’t be playing Katherine Mayfair, she’ll be playing Federal Agent Jordan Shaw.

Why this almost unprecedented move? Try ulterior motives. The network likely is hoping that Delany’s presence will draw more eyeballs to Castle, particularly since her first episode will air on Sunday, March 21 at 10 pm/ET following — duh — Housewives. (Brothers & Sisters has the week off.) The Emmy winner’s second Castle, which reunites her with her Desperate ex, Nathan Fillion, will air in the series’ regular Monday-at-10 timeslot on March 22.