Dr Julian Lewis secured the role despite widespread expectation that Mr Grayling would receive the backing of the Conservative-dominated Intelligence and Security Committee (ISC).
In a move that caught Westminster by surprise, the Tory leadership then took disciplinary action against Dr Lewis as sources said the MP had “acted with the opposition for his own advantage”.
Former Tory Cabinet minister and chairman of the ISC Mr Grieve told the BBC: “What troubles me about this episode, quite apart from its utter absurdity, and now withdrawing the whip from Julian, who is indeed highly respected, is the mindset it gives about what on earth is going on in Downing Street.
“Why did they try to manipulate this process? They shouldn’t have done.
“The committee can only exist, the committee can only be respected… if it is seen to be non-partisan, and independent.”
A senior Government source said the removal of the whip was because the MP was “working with Labour and other opposition MPs for his own advantage”.
Prime Minister Boris Johnson was widely believed to want former transport secretary Mr Grayling to become the chairman of the body which oversees the work of MI5, MI6 and GCHQ.
But the committee members voted instead for former defence select committee chairman Dr Lewis.
With the Conservatives enjoying a majority – with five out of nine places on the committee – there had been concern at Westminster that the Tory members would be “whipped” to support Mr Grayling despite concerns about his expertise.
Former national security adviser Lord Ricketts warned that Mr Grayling – who earned the nickname “Failing Grayling” during a chequered ministerial career – does not “match up” to the authority and reputation of former chairs.
Following Dr Lewis’s success, Lord Ricketts said the body was now in the “hands of someone with much wider experience of defence and security”.
As well as Mr Grayling and Dr Lewis, the members of the ISC are Tory MPs Theresa Villiers, Sir John Hayes and Mark Pritchard, Labour MPs Dame Diana Johnson and Kevan Jones, the Labour peer Admiral Lord West and the SNP MP Stewart Hosie.
Mr Johnson has faced criticism over the delay in appointing the committee which has not met since the last parliament was dissolved in November last year.
The committee has yet to publish its long-awaited report into Russian interference in UK politics after Mr Johnson refused to clear it for release before last year’s general election.
A committee source said: “This was a secret ballot but clearly for him (Mr Grayling) to lose, some Tories decided not to vote for him.”
Labour’s deputy leader Angela Rayner branded the move against Dr Lewis “grubby”.
She tweeted: “Julian Lewis MP has the Tory Whip removed after being elected as Chairman of the Intelligence and Security Select Committee, after beating hapless Chris Grayling. I wonder who in No10 ordered that the long serving Tory MP had the whip removed? What a grubby shower they are!”
Labour former frontbencher Chris Bryant said: “It’s a momentous failure of intelligence when a PM takes months to handpick Intelligence and Security Committee members so as to deliver the Chair he wants and they refuse to do his bidding. To then chuck the new chairman out of the party is to lose control/the plot.”
SNP defence spokesman Stewart McDonald MP said: “This is another total shambles from the Tory government, which has failed to put in place a functioning Intelligence and Security Committee for more than six months since the election.
“With his abysmal record of failure as a Tory minister, Chris Grayling is the only man who could lose a rigged election but it is right the committee has elected a chair and it should now get on with the crucial job of ensuring scrutiny and oversight of security matters, after months of delay.”
Liberal Democrat foreign affairs spokesman Alistair Carmichael said Mr Johnson had appointed “yes men” to the ISC but “true to form, however, failing Grayling has been undone in his bid to be chair”.
“I hope we now have a committee with real teeth that can hold this Government to account,” he added.
“That starts by publishing the report into Russian interference of our democracy before the summer recess so MPs can scrutinise it fully.”