This is book number 4 in the Magic Tree House series.
Illus. in black-and-white. Jack and Annie are in deep trouble when the Magic Tree House whisks them back to the days of desert islands, secret maps, hidden gold--and ruthless pirates! Will Jack and Annie discover a buried treasure? Will they find out the identity of the mysterious M? Or will they walk the plank?