Soon after his return, the general assembly appointed him to be the principal of the college of Glasgow, where he continued for some years. In the year 1576, the earl of Morton being then regent, and thinking to bring Mr. Melvil into his party, who were endeavouring to introduce episcopacy, he offered him the parsonage of Govan, a benefice of twenty-four chalders of grain, yearly, beside what he enjoyed as principal, providing he would not insist against the establishment of bishops, but Mr. Melvil rejected his offer with scorn.
He was afterwards transported to St. Andrews, where he served in the same station he had done at Glasgow, and was likewise a minister of that city. Here he taught the divinity class, and as a minister continued to witness against the incroachments then making upon the rights of the church of Christ.
When the general assembly sat down at Edinburgh, anno 1582, Mr. Melvil inveighed against the absolute authority, which was making its way into the church, whereby he said, they intended to pull the crown from Christ's head, and wrest the sceptre out of his hand, and when several articles, of the same tenor with his speech, were presented by the commission of the assembly, to the king and council, craving redress, the earl of Arran cried out, "Is there any here that dare subscribe these articles." Mr. Melvil went forward and said, "We dare, and will render our lives in the cause," and then took up the pen and subscribed. We do not find that any disagreeable consequences ensued at this time.
But in the beginning of February 1584, he was summoned to appear before the secret council on the 11th of that month, to answer for some things said by him in a sermon on a fast day from Dan. iv. At his first compearance, he made a verbal defence, but being again called, he gave in a declaration with a declinature, importing that he had said nothing either in that or any other sermon tending to dishonour the king, but had regularly prayed for the preservation and prosperity of his majesty; that, as by acts of parliament and laws of the church, he should be tried for his doctrine by the church, he therefore protested for, and craved a trial by them, and particularly in the place (St Andrews) where the offence was alledged to have been committed; that as there were special laws in favour of St. Andrews to the above import, he particularly claimed the privilege of them; he farther protested that what he had said was warranted by the word of God; that he appealed to the congregation who heard the sermon; that he craved to know his accusers; that if the calumny was found to be false, the informers might be punished; that the rank and character of the informer might be considered, &c. &c.: After which he gave an account of the sermon in question, alledging that his meaning had been misunderstood, and his words perverted.
When he had closed his defence, the king and the earl of Arran, who was then chancellor, raged exceedingly against him. Mr. Melvil remained undisquieted, and replied, that they were too bold in a constitute Christian kirk to pass by the pastors, &c. and to take upon them to judge the doctrine, and controul the messengers of a greater than any present; "that you may see your rashness in taking upon you that which you neither ought nor can do, (taking out a small Hebrew Bible and laying it down before them,) there are," said he, "my instructions and warrant, -- see if any of you can controul me, that I have passed my injunctions." The chancellor, opening the book, put it into the king's hand, saying, "Sire, he scorneth your majesty and the council." "Nay," said Mr. Melvil, "I scorn not, but I am in good earnest." He was, in the time of this debate, frequently removed and instantly recalled, that he might not have time to consult with his friends. They proceeded against him, and admitted his avowed enemies to prove the accusation. Though the whole train of evidence, which was led, proved little or nothing against him, yet they resolved to involve him in troubles, because he had declined their authority, as incompetent judges of doctrine, and therefore remitted him to ward in the castle of Edinburgh, during the king's will. Being informed, that, if he entered into ward, he would not be released, unless it should be to bring him to the scaffold, that the decree of the council was altered, and Blackness was appointed for his prison, which was kept by some dependants on the earl of Arran, he resolved to get out of the country. A macer gave him a charge, to enter Blackness in 24 hours: and, in the mean while, some of Arran's horsemen were attending at the west-port to convoy him thither: But, by the time he should have entered Blackness, he had reached Berwick. Messrs. Lawson and Balcanquhal gave him the good character he deserved, and prayed earnestly for him in public, in Edinburgh, which both moved the people and galled the court exceedingly.
After the storm had abated, he returned to St. Andrews in 1586, when the synod of Fife had excommunicated P. Adamson, pretended bishop of St. Andrews, on account of some immoralities. He (Adamson) having drawn up the form of an excommunication against Messrs. Andrew and James Melvils, and sent out a boy, with some of his own creatures, to the kirk to read it, but the people paying no regard to it, the bishop (though both suspended and excommunicated) would himself go to the pulpit to preach, whereupon some gentlemen &c. in town conveened in the new college to hear Mr. Melvil. But the bishop being informed that they were assembled on purpose to put him out of the pulpit and hang him, for fear of which, he called his friends together, and betook himself to the steeple; but at the entreaty of the magistrates and others he retired home.
This difference with the bishop brought the Melvils again before the king and council, who (pretending that there was no other method to end that quarrel,) ordained Mr. Andrew to be confined to the Mearns, Angus, &c. under pretext that he would be useful in that country in reclaiming papists. And, because of his sickly condition, Mr. James was sent back to the new college; and, the university sending the dean of faculty, and the masters, with a supplication to the king in Mr. Andrew's behalf, he was suffered to return, but was not restored to his place and office until the month of August following.
The next winter, he laboured to give the students in divinity, under his care, a thorough knowledge of the discipline and government of the church, which was attended with considerable success; the specious arguments of episcopacy evanished, and the serious part both of the town and university repaired to the college to hear him, and Mr. Robert Bruce, who began preaching about this time.
After this he was chosen moderator in some subsequent assemblies of the church, in which several acts were made in favours of religion, as maintained in that period.
When the king brought home his queen from Denmark anno 1590, Mr. Melvil made an excellent oration, upon the occasion in Latin, which so pleased the king, that he publicly declared, he had therein both honoured him and his country, and that he should never be forgot; yet such was the instability of this prince, that, in a little after this, because Mr. Melvil opposed himself unto his arbitrary measures, in grasping after an absolute authority over the church, he conceived a daily hatred against him ever after, as will appear from the sequel.
When Mr. Melvil went, with some other ministers, to the convention of estates at Falkland anno 1596, (wherein they intended to bring home the excommunicated lords who were then in exile), and though he had a commission from last assembly, to watch against every imminent danger that might threaten the church, yet, whenever he appeared upon the head of the ministers, the king asked him, Who sent for him there? To which he resolutely answered, "Sire, I have a call to come here from Christ and his church, who have a special concern in what you are doing here, and in direct opposition to whom, ye are all here assembled; but be ye assured, that no counsel taken against him shall prosper, and I charge you, Sire, in his name, that you, nor your estates here conveened, favour not God's enemies whom he hateth." After he had said this, turning himself to the rest of the members, he told them, that they were assembled with a traiterous design against Christ, his church, and their native country. In the midst of this speech, he was commanded by the king to withdraw.
The commission of the general assembly was now sitting, and understanding how matters were going on at the convention, they sent some of their members, among whom Mr. Melvil was one, to expostulate with the king. When they came, he received them in his closet. Mr. James Melvil being first in the commission, told the king his errand, upon which he appeared angry, and charged them with sedition, &c. Mr. James being a man of cool passion and genteel behaviour, began to answer the king with great reverence and respect; but Mr. Andrew, interrupting him, said, "This is not a time to flatter, but to speak plainly, for our commission is from the living God, to whom the king is subject;" and then approaching the king, said, "Sire, we will always humbly reverence your majesty in public, but having opportunity of being with your majesty in private, we must discharge our duty or else be enemies to Christ: and now, Sire, I must tell you, that there are two kingdoms, the kingdom of Christ, which is the church, whose subject K. James VI. is, and of whose kingdom he is not a head, nor a lord, but a member, and they, whom Christ hath called, and commanded to watch over his church, and govern his spiritual kingdom, have sufficient authority and power from him so to do, which no Christian king nor prince should controul or discharge, but assist and support, otherwise they are not faithful subjects to Christ; and, Sire, when you was in your swaddling clothes, Christ reigned freely in this land; in spight of all his enemies, his officers and ministers were conveened for ruling his church, which was ever for your welfare, &c. Will you now challenge Christ's servants, your best and most faithful subjects, for conveening together, and for the care they have of their duty to Christ and you, &c. the wisdom of your council is, that you may be served with all sorts of men, that you may come to your purpose, and because the ministers and protestants of Scotland are strong, they must be weakened and brought low, by stirring up a party against them, but, Sire, this is not the wisdom of God, and his curse must light upon it, whereas, in cleaving to God, his servants shall be your true friends, and he shall compel the rest to serve you." There is little difficulty to conjecture how this discourse was relished by the king; however, he kept his temper, and promised fair things to them for the present, but it was the word of him whose standard maxim was, Qui nescit dissimulare, nescit regnare, "He who knows not how to dissemble, knows not how to reign:" In this sentiment, unworthy of the meanest among men, he gloried, and made it his constant rule of conduct; for in the assembly at Dundee anno 1598, Mr. Melvil being there, he discharged him from the assembly, and would not suffer business to go on till he was removed.
There are other instances of the magnanimity of this faithful witness of Christ, which are worthy of notice. In the year 1606, when he and seven of his brethren, who stood most in the way of having prelacy advanced in Scotland, were called up to England, under pretence of having a hearing granted them by the king, &c. with respect to religion, but rather to be kept out of the way, as the event afterwards proved, until episcopacy should be better established in this kingdom. Soon after their arrival they were examined by the king and council at Hampton-court on the 20th of September, concerning the lawfulness of the late assembly at Aberdeen. The king, in particular, asked Mr. Melvil, whether a few clergy, meeting without moderator or clerk, could make an assembly? He replied, there was no number limited by law; that fewness of number could be no argument against the legality of the court, especially when the promise was, in God's word, given to two or three conveened in the name of Christ; that the meeting was an ordinary established by his majesty's laws. The rest of the ministers delivered themselves to the same purpose; after which Mr. Melvil, with his usual freedom of speech, supported the conduct of his brethren at Aberdeen; recounted the wrongs done them at Linlithgow, whereof he was a witness himself; he blamed the king's advocate, Sir Thomas Hamilton, who was then present, for favouring popery, and mal-treating the ministers, so that the accuser of the brethren could not have done more against the saints of God than had been done; the prelatists were encouraged, though some of them were promoting the interest of Popery with all their might, and the faithful servants of Christ were shut up in prison; and addressing the advocate, personally, he added, "Still you think all this is enough, but continue to persecute the brethren with the same spirit you did in Scotland." After some conversation betwixt the king and arch-bishop of Canterbury, they were dismissed with the applause of many present, for their bold and steady defence of the cause of God and truth, for they had been much misrepresented to the English. They had scarce retired from before the king, until they received a charge not to return to Scotland, nor come near the king's, queen's or princes court, without special licence and being called for. A few days after, they were again called to court, and examined before a select number of the Scots nobility, where, after Mr. James Melvil's examination, Mr. Andrew being called, told them plainly, "That they knew not what they were doing; they had degenerated from the ancient nobility of Scotland, who were wont to hazard their lives and lands for the freedom of their country, and the gospel which they were betraying and overturning:" But night drawing on, they were dismissed.
Another instance of his resolution is, that, when called before the council for having made a Latin epigram, upon seeing the king and queen making an offering at the altar (whereon were two books, two basons, and two candlesticks with two unlighted candles, it being a day kept in honour of St. Michael); when he compeared, he avowed the verses, and said, "He was much moved with indignation at such vanity and superstition in a Christian church, under a Christian king, born and brought up under the pure light of the gospel, and especially before idolators, to confirm them in idolatry, and grieve the hears of true professors," The bishop of Canterbury began to speak, but Mr. Melvil charged him with a breach of the Lord's day, with imprisoning, silencing and bearing down of faithful ministers, and with upholding antichristian hierarchy and popish ceremonies; and, shaking the white sleeve of his rochet, he called them Romish, rags, and told him, That he was an avowed enemy to all the reformed churches in Europe, and therefore he (Mr. Melvil) would profess himself an enemy to him in all such proceedings, to the effusion of the last drop of his blood; and said, he was grieved to the heart to see such a man have the king's ear, and sit so high in that honourable council. He also charged bishop Barlow with having said, after the conference at Hampton-court, That the king had said, he was in the church of Scotland, but not of it; and wondered that he was suffered to go unpunished, for making the king of no religion. He refuted his sermon which had been preached before; and was at last removed, and order was given to Dr. Overwall dean of St. Pauls to receive him to his house, there to remain, with injunctions not to let any have access to him, till his majesty's pleasure was signified. Next year he was ordered from the dean's house to the bishop of Winchester's, where, not being so strictly guarded, he sometimes kept company with his brethren, but was at last committed to the tower of London, where he remained for the space of four years.
While he was in the tower, a gentleman of his acquaintance got access to him, and found him very pensive and melancholy concerning the prevailing defections amongst many of the ministers of Scotland, and, having lately got account of their proceedings at the general assembly held at Glasgow, anno 1610, where the earl of Dunbar had an active hand in corrupting many with money; the gentleman, desiring to know what word he had to send to his native country, got no answer at first, but, upon a second enquiry, he said, "I have no word to send, but am heavily grieved, that the glorious government of the church of Scotland should be so defaced, and a popish tyrannical one set up; and thou, Manderston, (for out of that family Dunbar had sprung), hadst thou no other thing to do, but to carry such commissions down to Scotland, whereby the poor church is wrecked, the Lord shall be avenged on thee; thou shalt never have that grace to set thy foot in that kingdom again." These last words impressed the gentleman to that degree, that he desired some who attended the court, to get some business, which was managing through Dunbar's interest, expeded without any delay, being persuaded that the word of that servant of Christ should not fall to the ground, which was the case, for that earl died at Whitehall a short time after, while he was building an elegant house at Berwick, and making grand preparations for his daughter's marriage with Lord Walden.
In 1611, after four years confinement, Mr. Melvil was, by the interest of the duke of Bolloigne, released, on condition that he would go with him to the university of Sedan, where he continued, enjoying that calm repose denied him in his own country, but maintaining his usual constancy and faithfulness in the service of Christ, which he had done through the whole of his life.
The reader will readily observe, that a high degree of fortitude and boldness appeared in all his actions; where the honour of his Lord and Master was concerned, the fear of man made no part of his character. He is by Spotswood styled the principal agent or apostle of the presbyterians in Scotland. He did indeed assert the rights of presbytery to the utmost of his power against diocesan episcopacy; he possessed great presence of mind, and was superior to all the arts of flattery, that were sometimes tried with him; he was once blamed, as being too fiery in his temper, he replied, "If you see my fire go downward, set your foot upon it, but if it goes upward, let it go to its own place." He died at Sedan in France, in a few years after.